Commit 2ce3c82
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
Differential Revision: https://internalfb.com/D44240779
fbshipit-source-id: 68c1d3b1ae7550d18815f7d27edac68ece76667c1 parent cf43f9c commit 2ce3c82
File tree
1 file changed
+8
-19
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput
1 file changed
+8
-19
lines changedLines changed: 8 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
| 686 | + | |
| 687 | + | |
691 | 688 | | |
692 | | - | |
693 | | - | |
694 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
695 | 692 | | |
696 | 693 | | |
697 | 694 | | |
698 | 695 | | |
699 | 696 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
| 697 | + | |
709 | 698 | | |
710 | 699 | | |
711 | 700 | | |
| |||
1132 | 1121 | | |
1133 | 1122 | | |
1134 | 1123 | | |
1135 | | - | |
1136 | | - | |
| 1124 | + | |
| 1125 | + | |
1137 | 1126 | | |
1138 | 1127 | | |
1139 | 1128 | | |
| |||
0 commit comments