-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
The problem
On safari mobile, TouchableOpacity will trigger another component at the same location when changing views (if second component is an "<input>" or "<TextInput>").
<input> example provided below. Similar behavior for a TextInput at same location; however, unable to reproduce succinctly in sandbox (using Redux Form for this implementation).
How to reproduce
https://codesandbox.io/s/6njwzqojnr
(I tried to minimize redux / router code).
If you load on mobile safari on iPhone and click the upper left of the first component (i.e.TouchableOpacity, blue) it will trigger the second component (i.e. <input>, red).
Steps to reproduce:
- TouchableOpacity overlapping where in second view, w/ onPress triggers view change
- User touches TouchableOpacity in the overlapping location
- gets triggered unintentionally. Longer presses increase frequency of unexpected behavior
Expected behavior
Expected touchstart and touchend events only.
(Using safari devtools hooked up to my iPhone, recorded events are: touchstart, touchend, mouseover, mousemove, mousedown, mouseup, and click (<-- targets the input file). In my app, the final click gets fired twice, even.
RNW: 0.9.6
RN: 0.57.4
Browser: Safari (iOS12, iPhone 7)