From 7846c016c971913539f7d6a31adf2fb371f61368 Mon Sep 17 00:00:00 2001 From: Wouter Deman Date: Fri, 17 Nov 2017 15:44:40 +0100 Subject: [PATCH] Fixing invalid pointer id for internet explorer --- src/angular-gridster.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/angular-gridster.js b/src/angular-gridster.js index c6607e0a..479cbd77 100755 --- a/src/angular-gridster.js +++ b/src/angular-gridster.js @@ -1183,7 +1183,7 @@ }; // IE pointer model - if (target.msSetPointerCapture && prevent) { + if (target.msSetPointerCapture && prevent && window.navigator.msPointerEnabled) { target.msSetPointerCapture(pointerId); } else if (theEvtObj.type === 'mousedown' && numberOfKeys(lastXYById) === 1) { if (useSetReleaseCapture) { @@ -1233,7 +1233,7 @@ // in the Microsoft pointer model, release the capture for this pointer // in the mouse model, release the capture or remove document-level event handlers if there are no down points // nothing is required for the iOS touch model because capture is implied on touchstart - if (target.msReleasePointerCapture) { + if (target.msReleasePointerCapture && window.navigator.msPointerEnabled) { target.msReleasePointerCapture(pointerId); } else if (theEvtObj.type === 'mouseup' && numberOfKeys(lastXYById) === 0) { if (useSetReleaseCapture) {