Commit 1473f39
authored
[Native] Fix native GestureDetector
## Description
Fixes
#4254
Fabric computes view ordering from each shadow node’s orderIndex, which
React Native derives from zIndex. Since RNGH v3 inserts an
RNGestureHandlerDetector shadow node between the parent and the actual
child view, the parent was sorting the detector instead of the styled
child. The detector kept the default order index, so components like v3
Pressable did not respect zIndex.
This PR makes RNGestureHandlerDetectorShadowNode mirror its single
child’s RN-computed order index. For multi-child detectors, it keeps
neutral ordering because no single detector order index can accurately
represent multiple children with independent zIndex values.
## Test plan
Test reproducer from the issuezIndex handling (#4257)1 parent 9938977 commit 1473f39
2 files changed
Lines changed: 20 additions & 0 deletions
File tree
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
0 commit comments