Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize EditText Spans 1/N: Fix precedence #36543

Closed
wants to merge 1 commit into from

Commits on Mar 24, 2023

  1. Minimize EditText Spans 1/9: Fix precedence (facebook#36543)

    Summary:
    Pull Request resolved: facebook#36543
    
    This is part of a series of changes to minimize the number of spans committed to EditText, as a mitigation for platform issues on Samsung devices. See this [GitHub thread]( facebook#35936 (comment)) for greater context on the platform behavior.
    
    We cache the backing EditText span on text change to later measure. To measure outside of a TextInput we need to restore any spans we removed. Spans may overlap, so base attributes should be behind everything else.
    
    The logic here for dealing with precedence is incorrect, and we should instead accomplish this by twiddling with the `SPAN_PRIORITY` bits.
    
    Changelog:
    [Android][Fixed] - Minimize Spans 1/N: Fix precedence
    
    Reviewed By: javache
    
    Differential Revision: D44240779
    
    fbshipit-source-id: 0624dd7dd77d14be339c0397bb9bc92f2c76ce73
    NickGerleman authored and facebook-github-bot committed Mar 24, 2023
    Configuration menu
    Copy the full SHA
    f007d97 View commit details
    Browse the repository at this point in the history