Short interval touch events are not recognized in Safari
Before react-remove-scroll mounted, it can detect taps at short interval (e.g. double tap), but once mounted it sometimes fails to recognize the double tap.
Reproduction
- Open this URL in iOS Safari (iOS 13.4+).
- Make sure it counts up 2 with a double tap.
- Tap "Toggle RemoveScroll" button. (it makes react-remove-scroll mounted.)
- Double-tap to check that sometimes only one counts up.
I've seen this happen on iOS 13.4 and 13.5. but not on iOS 13.3 and iOS 12.2.
That's very interesting observation - look like something is preventing events from happening "faster" than 300ms each(I've measured), which is basically "onClick".
In other words that might mean that remove scroll by some way disabled touch end at all.
Probably the root cause is somewhere inside react and using onTouchMoveCapture triggers that behavior.
https://github.com/theKashey/react-remove-scroll/blob/master/src/UI.tsx#L30
This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.