Issue metadata
Sign in to add a comment
|
Mousedown & mouseup events not getting fired.
Reported by
robincha...@gmail.com,
Dec 16 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36 Steps to reproduce the problem: 1. Add a mousedown/mouseup event handler to an element 2. And try clicking, it won't fire the event. 3. What is the expected behavior? Should fire mousedown event on click What went wrong? Not firing mousedown/up events. Did this work before? Yes it worked till yesterday. i think the previous version. Chrome version: 55.0.2883.95 Channel: stable OS Version: OS X 10.11.6 Flash Version: Shockwave Flash 24.0 r0
,
Dec 16 2016
I researched some more, and here is my understanding.
The element I tried to add 'mousedown' event was inside another element, which was using a jquery library, jquery.panzoom.js. So when i checked that library they had a condition like,
events[ ((!!window.PointerEvent) ? 'pointerdown' : 'mousedown') + ns ] = function() {
self.transition(true);
};
I think the pointerevent is a new event in chrome 55. So before this version there were no pointerevent, and this library was using 'mousedown' event instead. Since pointerevents are available now, the library binded 'pointerdown' and that broke a child element's mousedown event.
,
Dec 16 2016
Yes Chrome 55 supports pointer events and it appears from github (https://github.com/timmywil/jquery.panzoom) uses pointer events. Can you please provide us a reproduction URI that we can debug? ie; a jsbin or a jsfiddle would be awesome.
,
Dec 16 2016
I just reproduced the same on jsbin. Please follow the link https://jsbin.com/fivosay/edit?html,js,output If you comment out the panzoom initialization, that mousedown event works, otherwise it won't. It works if you edit the panzoom library to always use mousedown instead of pointer events.
,
Dec 16 2016
The library is preventDefaulting the pointerdown event here: https://github.com/timmywil/jquery.panzoom/blob/master/src/panzoom.js#L969 This causes mousedown event not to be sent as per the pointer event specification. Before you got the event because it was bubbling (they didn't stop propagation of the event) So fundamentally the browser is working correctly and I have verified it has the same issue on MS Edge on a Windows phone.
,
Dec 16 2016
Oh okay! I haven't dig deep into the library! Thanks for helping out :)
,
Jan 5 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Dec 16 2016Components: -Blink Blink>Input