Skip to content

Commit 2ca1ff5

Browse files
committed
Better IE compatibility
1 parent 28a2444 commit 2ca1ff5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/BrowserInfo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function userAgent(pattern) {
22
return !!navigator.userAgent.match(pattern);
33
}
44

5-
const IE11OrLess = /*@__PURE__*/userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i);
5+
const IE11OrLess = /*@__PURE__*/userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
66
const Edge = /*@__PURE__*/userAgent(/Edge/i);
77
const FireFox = /*@__PURE__*/userAgent(/firefox/i);
88
const Safari = /*@__PURE__*/userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);

src/Sortable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ function Sortable(el, options) {
377377
dataIdAttr: 'data-id',
378378
delay: 0,
379379
delayOnTouchOnly: false,
380-
touchStartThreshold: Number.parseInt(window.devicePixelRatio, 10) || 1,
380+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
381381
forceFallback: false,
382382
fallbackClass: 'sortable-fallback',
383383
fallbackOnBody: false,
@@ -666,7 +666,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
666666
},
667667

668668
_triggerDragStart: function (/** Event */evt, /** Touch */touch) {
669-
touch = touch || (evt.pointerType == 'touch' ? evt : null);
669+
touch = touch || (evt.pointerType == 'touch' && evt);
670670

671671
if (!this.nativeDraggable || touch) {
672672
if (this.options.supportPointer) {

0 commit comments

Comments
 (0)