Skip to content

Commit

Permalink
synthetic dblclick events relate to left button (Leaflet#6628)
Browse files Browse the repository at this point in the history
This is a backport of https://cgit.freedesktop.org/libreoffice/online/commit/?id=d0906c12d82e0242b0709349979a9061da9c6a83 - synthetic `dblclick` events spawned from `DomEvent.DoubleTap.js` shall refer to [button 0](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button#Return_value), so double taps can be interpreted as double clicks of the *left* button (instead of double clicks of an *`undefined`* button).
  • Loading branch information
IvanSanchez authored and Schleuse committed Dec 3, 2019
1 parent d2ac09e commit 515b3f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dom/DomEvent.DoubleTap.js
Expand Up @@ -50,6 +50,7 @@ export function addDoubleTapListener(obj, handler, id) {
touch = newTouch;
}
touch.type = 'dblclick';
touch.button = 0;
handler(touch);
last = null;
}
Expand Down

0 comments on commit 515b3f0

Please sign in to comment.