Skip to content

Commit

Permalink
Better IE compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-m1 committed Jun 11, 2019
1 parent 28a2444 commit 2ca1ff5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BrowserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function userAgent(pattern) {
return !!navigator.userAgent.match(pattern);
}

const IE11OrLess = /*@__PURE__*/userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i);
const IE11OrLess = /*@__PURE__*/userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
const Edge = /*@__PURE__*/userAgent(/Edge/i);
const FireFox = /*@__PURE__*/userAgent(/firefox/i);
const Safari = /*@__PURE__*/userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
Expand Down
4 changes: 2 additions & 2 deletions src/Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function Sortable(el, options) {
dataIdAttr: 'data-id',
delay: 0,
delayOnTouchOnly: false,
touchStartThreshold: Number.parseInt(window.devicePixelRatio, 10) || 1,
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
forceFallback: false,
fallbackClass: 'sortable-fallback',
fallbackOnBody: false,
Expand Down Expand Up @@ -666,7 +666,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
},

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

if (!this.nativeDraggable || touch) {
if (this.options.supportPointer) {
Expand Down

0 comments on commit 2ca1ff5

Please sign in to comment.