tap double trigger on chrome 55 #1249

Closed
Xaber20110202 opened this Issue Dec 26, 2016 · 9 comments

Comments

Projects
None yet
7 participants
@Xaber20110202

when I remove pointer event, it returns to normal

@kslimani

This comment has been minimized.

Show comment
Hide comment
@kslimani

kslimani Dec 30, 2016

@Xaber20110202 what is your OS please ? do you experience this behaviour under Android only ?

@Xaber20110202 what is your OS please ? do you experience this behaviour under Android only ?

@Xaber20110202

This comment has been minimized.

Show comment
Hide comment
@Xaber20110202

Xaber20110202 Dec 30, 2016

on macOS chrome 55

on macOS chrome 55

@Xaber20110202

This comment has been minimized.

Show comment
Hide comment
@Xaber20110202

Xaber20110202 Dec 30, 2016

thank for your reply!

thank for your reply!

@mbyor

This comment has been minimized.

Show comment
Hide comment
@mbyor

mbyor Dec 31, 2016

Confirming what @Xaber20110202 reported. Since Chrome 55 for mobile is out, the tap event (coming with the touch module) is misbehaving - once it will trigger twice on single tap, other times it may not trigger at all, requiring 2nd tap for something to happen.

The reason behind this behaviour is PointerEvents added in Chrome since version 55. More info about these and why were added:

https://blog.chromium.org/2016/10/chrome-55-beta-input-handling.html
https://developers.google.com/web/updates/2016/10/pointer-events

All this means that since Chrome 55 apart from any touch event being fired (e.g. "touchstart"), Chrome will also fire the respective pointer one (e.g. "pointerdown" is fired together with "touchstart"). Zepto already has some pointer events handling added for MS Edge and IE11, which seems to be incompatible with Chrome's pointer events fired together with touch events.

To get the touch module fixed it will have to either be rewritten so to handle separately/properly pointer events fired by Chrome and MS browsers or, as a quick hack, ignore pointer events if fired and the browser is Chrome. Another solution is what @Xaber20110202 mentioned as well - to simply remove all pointer events handling from the touch module, which works very well given one doesn't have to support MS mobile browsers. This is also the quick solution I went for couple of weeks ago when stumbled upon this issue...

mbyor commented Dec 31, 2016

Confirming what @Xaber20110202 reported. Since Chrome 55 for mobile is out, the tap event (coming with the touch module) is misbehaving - once it will trigger twice on single tap, other times it may not trigger at all, requiring 2nd tap for something to happen.

The reason behind this behaviour is PointerEvents added in Chrome since version 55. More info about these and why were added:

https://blog.chromium.org/2016/10/chrome-55-beta-input-handling.html
https://developers.google.com/web/updates/2016/10/pointer-events

All this means that since Chrome 55 apart from any touch event being fired (e.g. "touchstart"), Chrome will also fire the respective pointer one (e.g. "pointerdown" is fired together with "touchstart"). Zepto already has some pointer events handling added for MS Edge and IE11, which seems to be incompatible with Chrome's pointer events fired together with touch events.

To get the touch module fixed it will have to either be rewritten so to handle separately/properly pointer events fired by Chrome and MS browsers or, as a quick hack, ignore pointer events if fired and the browser is Chrome. Another solution is what @Xaber20110202 mentioned as well - to simply remove all pointer events handling from the touch module, which works very well given one doesn't have to support MS mobile browsers. This is also the quick solution I went for couple of weeks ago when stumbled upon this issue...

@MarvinXu

This comment has been minimized.

Show comment
Hide comment
@MarvinXu

MarvinXu Jan 3, 2017

@mbyor cool! problem solved!

MarvinXu commented Jan 3, 2017

@mbyor cool! problem solved!

@bitfool

This comment has been minimized.

Show comment
Hide comment
@bitfool

bitfool Jan 11, 2017

mbyor, MarvinXu,
could one of you describe more clearly (code) how you code to "ignore pointer events if fired and the browser is Chrome"? i'm not having success in my initial attempts, but it sounds like the way to go to get my old app upgraded with this more recent touch.js and back working with Chrome.

bitfool commented Jan 11, 2017

mbyor, MarvinXu,
could one of you describe more clearly (code) how you code to "ignore pointer events if fired and the browser is Chrome"? i'm not having success in my initial attempts, but it sounds like the way to go to get my old app upgraded with this more recent touch.js and back working with Chrome.

@MarvinXu

This comment has been minimized.

Show comment
Hide comment
@MarvinXu

MarvinXu Feb 4, 2017

image
@bitfool
I simply removed all event name containing "pointer" in the first parameter of all event binding functions...

MarvinXu commented Feb 4, 2017

image
@bitfool
I simply removed all event name containing "pointer" in the first parameter of all event binding functions...

@maobon

This comment has been minimized.

Show comment
Hide comment
@maobon

maobon Feb 15, 2017

swipeLeft and swipeRight went wrong...

maobon commented Feb 15, 2017

swipeLeft and swipeRight went wrong...

@madrobby

This comment has been minimized.

Show comment
Hide comment
@madrobby

madrobby Aug 6, 2017

Owner

Duplicate of #1238

Owner

madrobby commented Aug 6, 2017

Duplicate of #1238

@madrobby madrobby marked this as a duplicate of #1238 Aug 6, 2017

@madrobby madrobby closed this Aug 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment