diff --git a/changelog.txt b/changelog.txt index 4eb7f7e7..1cd6f9df 100644 --- a/changelog.txt +++ b/changelog.txt @@ -21,6 +21,7 @@ OPENSEADRAGON CHANGELOG * Arrow key navigation fixed across platforms (#565) * Removed textarea element from viewer DOM. Viewer.canvas now handles keyboard navigation (#569) * Removed 'position' property from MouseTracker keyDownHandler/keyUpHandler/keyHandler functions (#573) +* Fixed pointer event model detection for IE 10 and IE 11 (#571) * Added setMouseNavEnabled() support to Navigator (#572) 1.2.0: diff --git a/src/mousetracker.js b/src/mousetracker.js index 86e87076..609fde7b 100644 --- a/src/mousetracker.js +++ b/src/mousetracker.js @@ -977,7 +977,8 @@ $.MouseTracker.subscribeEvents.push( "MozMousePixelScroll" ); } - if ( window.PointerEvent ) { + // Note: window.navigator.pointerEnable is deprecated on IE 11 and not part of W3C spec. + if ( window.PointerEvent && ( window.navigator.pointerEnabled || $.Browser.vendor !== $.BROWSERS.IE ) ) { // IE11 and other W3C Pointer Event implementations (see http://www.w3.org/TR/pointerevents) $.MouseTracker.havePointerEvents = true; $.MouseTracker.subscribeEvents.push( "pointerover", "pointerout", "pointerdown", "pointerup", "pointermove", "pointercancel" ); @@ -988,7 +989,7 @@ $.MouseTracker.maxTouchPoints = 0; } $.MouseTracker.haveMouseEnter = false; - } else if ( window.MSPointerEvent ) { + } else if ( window.MSPointerEvent && window.navigator.msPointerEnabled ) { // IE10 $.MouseTracker.havePointerEvents = true; $.MouseTracker.subscribeEvents.push( "MSPointerOver", "MSPointerOut", "MSPointerDown", "MSPointerUp", "MSPointerMove", "MSPointerCancel" );