Repository navigation
Commit 7ad735a
fix(mobile): long-pressing a thread row no longer navigates into the thread
On iOS the long-press context menu rows are a plain Pressable wrapped in
the patched MenuView: the native button is touch-transparent so the row
keeps handling taps, and the UIContextMenuInteraction lives on the host
component view. RN's Fabric touch handler refuses to be prevented by
recognizers inside the RN view tree (RCTSurfaceTouchHandler
canBePreventedByGestureRecognizer), so the touch is never cancelled when
the menu opens - on finger-up Pressability fired onPress and navigated
with the menu already showing. Releasing just under the ~500ms menu
threshold navigated too, since a Pressable without onLongPress fires
onPress after any hold duration.
Mirror the Android branch in ControlPillMenu: in long-press mode, clone
the child with a no-op onLongPress and delayLongPress of 350ms. Once
onLongPress dispatches, Pressability swallows the release, so holds past
350ms can only open the menu, never tap through.
Co-Authored-By: Claude Fable 5 <[email protected]>1 parent bd18d8d commit 7ad735a
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
136 | 152 | | |
137 | 153 | | |
138 | | - | |
| 154 | + | |
139 | 155 | | |
140 | 156 | | |
141 | 157 | | |
0 commit comments