提交 2ca1ff5f 编写于 作者: O owen-m1

Better IE compatibility

上级 28a2444c
......@@ -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);
......
......@@ -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,
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册