-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
The problem
The overall issue appears to be that a) events don't always occurs in the same order, which means the responder is not transferred correctly, b) mouse move events during a touch can cause the responder to be terminated, and c) scroll events are not always fired in situations where they are expected in React Native.
There are problems with the responder event system setup that are covered by these issues:
#693
https://glitch.com/edit/#!/statuesque-bedbug
locationX is relative to the element on which the native event occurred but not the element which the responder event is attached.
#731
https://glitch.com/edit/#!/cultured-bracket
In React Native, ScrollView will trigger onScroll events if you're dragging down when at the top of the scroll view - this allows the responder system to transfer the responder grant from the touchable back to the scroll view. But the web stops dispatching scroll events when scrollTop === 0, so the responder system leaves the touchable as the responder. The reported issue goes away when ScrollView dispatches a DOM scroll event after it receives a touchmove that occurs when scrollTop === 0.
#829
There are 2 significant issues with using
Touchable*
components within an app that relies on thedocument.body
(rather thanScrollView
) being the root scroller. I believe the root cause of both issues is that the body is not part of the responder system, whichTouchable
andScrollView
rely on to coordinate transfer of the responder grant.
#1164
https://codesandbox.io/s/6njwzqojnr
TouchableOpacity will trigger another component at the same location when changing views (if second component is an "" or "")
#1124
Across multiple browsers, if you hold the mouse very still onPress triggers, but if the mouse is in motion onPress does not work.
Context
Part of the solution may related to producing the correct events (as can be inferred from React Native). This might involve changes to the event filtering logic in the REP, and the scroll event logic in ScrollView.
Related incomplete patches
Attempts to patch these problems.