Skip to content

Commit

Permalink
Make linter happy, do not forget about IE11 & IE11 pointer events
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanSanchez authored and perliedman committed Jan 23, 2017
1 parent decc2c9 commit 300a442
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/dom/DomEvent.DoubleTap.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ L.extend(L.DomEvent, {
var count;

if (L.Browser.pointer) {
if (e.pointerType === 'mouse') { return; }
if ((!L.Browser.edge) || e.pointerType === 'mouse') { return; }
count = L.DomEvent._pointersCount;
} else {
count = e.touches.length;
Expand All @@ -33,10 +33,10 @@ L.extend(L.DomEvent, {
last = now;
}

function onTouchEnd() {
function onTouchEnd(e) {
if (doubleTap && !touch.cancelBubble) {
if (L.Browser.pointer) {
if (e.pointerType === 'mouse') { return; }
if ((!L.Browser.edge) || e.pointerType === 'mouse') { return; }

// work around .type being readonly with MSPointer* events
var newTouch = {},
Expand Down
2 changes: 1 addition & 1 deletion src/dom/DomEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ L.DomEvent = {
this.addPointerListener(obj, type, handler, id);

} else if (L.Browser.touch && (type === 'dblclick') && this.addDoubleTapListener &&
!(L.Browser.pointer && L.Browser.chrome) ) {
!(L.Browser.pointer && L.Browser.chrome)) {
// Chrome >55 does not need the synthetic dblclicks from addDoubleTapListener
// See #5180
this.addDoubleTapListener(obj, handler, id);
Expand Down

0 comments on commit 300a442

Please sign in to comment.