mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 08:13:38 +00:00
Ignore fake mousemove event triggered by Chrome
These happen due to certain DOM changes. It's a hack in Chrome's code and it seems to have gotten worse with a recent Chrome update, causing this bug. Thankfully the fake event can be identified easily. Change-Id: I1688054f5d57147a445db5116a6aafeb1f49ddc4 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/989
This commit is contained in:
parent
18ba5c1a76
commit
2a4a984ba5
|
@ -395,6 +395,16 @@
|
|||
* @param {jQuery.Event} e The mousemove event object
|
||||
*/
|
||||
LIP.mousemove = function ( e ) {
|
||||
// This is a fake mousemove event triggered by Chrome, ignore it
|
||||
if (
|
||||
e
|
||||
&& e.originalEvent
|
||||
&& e.originalEvent.webkitMovementX === 0
|
||||
&& e.originalEvent.webkitMovementY === 0
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( e ) {
|
||||
// Saving the mouse position is useful whenever we need to
|
||||
// run LIP.mousemove manually, such as when going to the next/prev
|
||||
|
|
Loading…
Reference in a new issue