[Bug]: iOS html_render WebViews ignore CSS touch-action, losing vertical drags to thread scroll and rightward drags to swipe-back #48068
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/mobile
Steps to reproduce#
- Open a thread in the iOS app containing an
html_renderpage with a pointer-driven canvas/element styled withtouch-action: none(for example, an interactive 3D orbit viewer) and messages above/below it soThreadFeedscrolls. - Drag vertically on the
touch-action: nonecanvas in the inline view. - Drag rightward across the
touch-action: nonecanvas in the inline view. - Tap the expand button to open the same
html_renderfull screen (ThreadAttachment), then drag rightward across thetouch-action: nonecanvas.
Expected behavior#
CSS touch-action is respected in both inline and full-screen iOS html_render WebViews:
- Vertical and horizontal drags on
touch-action: noneelements stay inside the page (rotating/panning the interactive surface) instead of scrollingThreadFeedor triggering stack swipe-back. - Taps/clicks,
<input type="range">sliders, inner scrollable containers,touch-action: auto/manipulationregions, outerThreadFeedscrolling, and swipe-back outside restrictive elements continue working normally.
Actual behavior#
- Inline vertical drag:
ThreadFeedintercepts the vertical drag after ~20 px and scrolls the conversation instead of letting the page handle pitch/vertical drag. - Inline rightward drag: iOS full-screen swipe-back (
interactiveContentPopGestureRecognizer) intercepts the drag and pops the thread back to Chats. - Full-screen rightward drag: iOS full-screen swipe-back intercepts the drag and pops the attachment screen back to the thread.
Likely cause#
In apps/mobile/src/features/threads/HtmlRenderWebView.tsx, WebKit's WKTouchActionGestureRecognizer only suppresses WKWebView's own scroll view, not ancestor UIKit UIScrollViews (ThreadFeed) or UINavigationController's interactive pop gesture (full-screen by default on iOS 26+). Without a non-passive touchmove handler calling preventDefault() for disallowed axes, WKTouchEventsGestureRecognizer does not claim the gesture from UIKit ancestors.
Impact#
Major degradation or frequent failure
Version or commit#
main @ 2674f6dcaa
Environment#
- iOS 27.0 Simulator (iPhone 17 Pro) and physical iPhone (iOS)
- T3 Code Mobile (
apps/mobile,react-native-webview14.0.1,react-native-screens5.0.0-t3.63)
Screenshots, recordings, or supporting files#
Repro on main (inline vertical drag scrolls ThreadFeed, inline rightward drag pops to Chats, full-screen rightward drag pops back to the thread):
https://github.com/user-attachments/assets/43bc5560-bf1f-4c0d-8767-911f4a73712b
Workaround#
None for interactive pointer-driven html_render pages on iOS; full-screen mode still loses rightward drags to swipe-back.
tanstack-source added labelsbug
Sign in to join this conversation.