Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
"Tap"-event incompatible with fastclick.js on iPhone/iPad #83
The tap-event defined for the set and cancel buttons are incompatible with fastclick.js, and probably similar js plugins/extensions. Fastclick removes the 300 ms delay on iPhone/iPad, and mobiscroll (implicitly) relies on this delay for handling "tap" instead of "click". What happens is that both a "tap" and a "click" is sent.
This is easily reproducible: Import both mobiscroll 2.4.4 and fastclick in same document, make the body clickable (for instance displaying an alert), and bring up a mobiscroll dialog. When Cancel or Set is "clicked" on iPhone/iPad, the body (element below) also recieves a click.
I don't know whether this is a "bug", possible new "feature" or what. But I would think combining both mobiscroll and fastclick (or something similar) on handheld web-applications are fairly common and should be addressed?
I found disabling the "tap"-event in mobiscroll fixed my issue. Just make the Set and Cancel-buttons listen to click again. Since fastclick solves the same issue as "tap" in mobiscroll, this seems like a fine solution. Perhaps make it an option whether to use "tap" on Set and Cancel?