JoryHogeveen/off-canvas-sidebars

Clicks in sidebar on iOS not working

JoryHogeveen opened this issue · 1 comments

Describe the bug

Clicks on iOS (mobile) are parsed AFTER the sidebar is closed and this do not work since the content on that location is changed after the sidebar closes.

Maybe related: https://gravitydept.com/blog/js-click-event-bubbling-on-ios

More info: https://stackoverflow.com/questions/20359872/prevent-click-event-after-handling-jquery-mobile-tap-event-on-ios

When users tap the screen on an iPad, iOS sends the TOUCHSTART and TOUCHEND events which jQuery Mobile treats as a "tap". But then 300ms later, iOS sends a "click" event. If I respond to the "tap" by advancing to the next page before the "click" occurs then the next page receives the "click" and if a button on the new page happens to appear in the location of the tap then it gets clicked.