ftlabs / fastclick

Polyfill to remove click delays on browsers with touch UIs
MIT License
18.66k stars 3.22k forks source link

FastClick.js and iOS8 #261

Closed jasonhr13 closed 9 years ago

jasonhr13 commented 10 years ago

Having some issues with FastClick.js in Phonegap on iOS 8. Does anyone know how I can resolve this, it just causes the whole app's JS to fail. What modifications can I make?

rowanbeentje commented 10 years ago

I've just given this a go in a basic page, and fastclick is still working fine there for me (eg see http://ftlabs.github.io/fastclick/examples/layer.html ). Do you get any errors, or is this just a weird combo with some other libraries?

(In other news, during testing it seems that with the viewport meta tags set there's no longer a click delay by default - double-tap to scroll is also disabled in those circumstances! - so soon we'll also disable fastclick there, see Issue #262).

rowanbeentje commented 10 years ago

On a real device, still seeing the fastclick demo working correctly.

jasonhr13 commented 10 years ago

My app has quite a few other scripts on it, with fastclick enabled all other scripts fail on my device.

rowanbeentje commented 10 years ago

We've tested with the FT Web App, which also uses quite a lot of other logic and still works. Can you possibly give us a few more details to work with? :) eg which scripts are failing? Do the scripts fail to get loaded from the server, fail to get executed, or do they execute but with error messages? What are the error messages? Is this only within PhoneGap, or does it also fail in the browser? (That could make a difference because PhoneGap may still be using the old webview...) If you include the fastclick javascript but don't execute it, does the error still occur?

jasonhr13 commented 10 years ago

Currently my app uses snap.js for a side drawer nav. When fastclick is enabled The app loads and shows the home screen (currently blank) but i am not able to swipe or touch to open the side drawer. I havent had any luck getting it going in a web browser but I can try again to see any errors that its giving.

rowanbeentje commented 10 years ago

I've set up a quick snap.js and fastclick combo at http://dev.labs.ft.com/rowan/snapjs/demo/ . (Only the "default" demo has fastclick added). In the iOS 8 browser and the homescreen it works correctly for me - only tested on an iPad, mind you.

jasonhr13 commented 10 years ago

Did you test this in PhoneGap on iOS 8, FastClick will not work on my app using snap.js.