JoryHogeveen / off-canvas-sidebars

This plugin will add various options to implement off-canvas sidebars in your WordPress theme based on the Slidebars jQuery plugin.
GNU General Public License v2.0
13 stars 4 forks source link

Clicks in sidebar on iOS not working #82

Open JoryHogeveen opened 4 years ago

JoryHogeveen commented 4 years ago

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

JoryHogeveen commented 4 years ago

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.