Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Commit

Permalink
Zoom/pan not working on Windows 10 Touch in Chrome and Edge Leaflet#6896
Browse files Browse the repository at this point in the history
  • Loading branch information
SveinLoken committed Nov 18, 2019
1 parent 587eb48 commit 2e34bda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/Browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export var pointer = !webkit && !!(window.PointerEvent || msPointer);
// This does not necessarily mean that the browser is running in a computer with
// a touchscreen, it only means that the browser is capable of understanding
// touch events.
export var touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window ||
export var touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 ||
(window.DocumentTouch && document instanceof window.DocumentTouch));

// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.
Expand Down
2 changes: 1 addition & 1 deletion src/dom/DomEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function addOne(obj, type, fn, context) {

var originalHandler = handler;

if (Browser.pointer && type.indexOf('touch') === 0) {
if ((Browser.pointer || Browser.edge) && type.indexOf('touch') === 0) {
// Needs DomEvent.Pointer.js
addPointerListener(obj, type, handler, id);

Expand Down

0 comments on commit 2e34bda

Please sign in to comment.