Commit 637f494
Minimize EditText Spans 1/N: Fix precedence
Summary:
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]( #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: D44240779
fbshipit-source-id: 1a9c1fb2b6f7d7d95c14752f73ea2b6f3bdad2c31 parent 6956d4f commit 637f494
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