Comments (4)
I've tested the version tagged at 3.0.0 with Chrome running on Windows 7 in an emulator, with 'emulate touch events' enabled in the web inspector settings. It seems fine now, though this might be a false positive. Waiting for confirmation from the reporter.
from fastclick.
Note that we made the decision NOT to delay click events on Chrome desktop (i.e. we don't support double-tap to zoom) precisely so that work-arounds like this library aren't necessary. Was the fix here to just disable support entirely for Chrome desktop UserAgents? That would be ideal. Eg. WebKit does a lot of work to try to generate good click events (eg. adjusting the position of the touch to the most likely element under the finger), so you don't want to intefere with that if you can help it. Unfortunately this is still necessary on Chrome for Android when the page is zoomable, but if I had my way we'd get rid of the delay there too :-)
from fastclick.
Note that we made the decision NOT to delay click events on Chrome desktop
That's excellent news and thank you for posting this update.
We opted for a more a generic fix instead of checking the user agent. Before the fix, FastClick behaved like this:
- if window.ontouchstart != undefined, add workaround listeners
- if a click event is fired without a preceding touchend event, cancel the click
Of course, the unintended effect was that on platforms like Chrome/Windows 7 pages were made unclickable. So now we do this:
- if window.ontouchstart != undefined, add workaround listeners
- if a click event is fired without a preceding touchend event, let the click through
This still isn't ideal because we're still adding the workaround listeners even if they're not needed by the device.
from fastclick.
WebKit does a lot of work to try to generate good click events (eg. adjusting the position of the touch to the most likely element under the finger), so you don't want to intefere with that if you can help it.
I'm with you on this: I can't wait for the day when FastClick won't be needed at all.
from fastclick.
Related Issues (20)
- $ (docment).on('click')这种写法反应特别慢
- 看图 HOT 2
- Mistake about the readme,the late 2015 browsers still have the 300ms problem HOT 1
- Logo design
- input type=file display:'none' class='needsclick'。input.click() won‘t work HOT 2
- ios下导致文本框聚焦困难 HOT 4
- Vue 引入fastclick后IOS的input聚焦延迟解决方案 HOT 8
- fastClick支持typescript吗 HOT 3
- use fastclick in vue project, audio cannot play correctly in ios HOT 2
- 移动端(准确来讲是ipad的webview)mouseup失效 HOT 2
- there is a problem with mouseup on ipad webview
- Android Chrome
- Add Note: Fastclick since iOS 9.3 not longer neccessary when using WKWebView HOT 5
- Delay can't be removed when using jQuery
- Issue when the class name is the same as a DOM content
- Fastclick makes elements inside shadow dom are unclickedable on IOS devices
- One click triggers two clicks HOT 2
- Fastclick on NuxtJS HOT 2
- Build script creates empty file
- <select> in PWA doesn't fire on Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastclick.