Skip to content

Commit 2addddd

Browse files
committed
1.10.2
1 parent aae2c97 commit 2addddd

6 files changed

+59
-35
lines changed

Sortable.js

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**!
2-
* Sortable 1.10.1
2+
* Sortable 1.10.2
33
* @author RubaXa <[email protected]>
44
* @author owenm <[email protected]>
55
* @license MIT
@@ -132,7 +132,7 @@
132132
throw new TypeError("Invalid attempt to spread non-iterable instance");
133133
}
134134

135-
var version = "1.10.1";
135+
var version = "1.10.2";
136136

137137
function userAgent(pattern) {
138138
if (typeof window !== 'undefined' && window.navigator) {
@@ -266,7 +266,7 @@
266266
} while (!selfOnly && (el = el.parentNode));
267267
}
268268

269-
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
269+
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
270270
/*jshint -W056 */
271271

272272
return matrixFn && new matrixFn(appliedTransforms);
@@ -291,10 +291,12 @@
291291
}
292292

293293
function getWindowScrollingElement() {
294-
if (IE11OrLess) {
295-
return document.documentElement;
294+
var scrollingElement = document.scrollingElement;
295+
296+
if (scrollingElement) {
297+
return scrollingElement;
296298
} else {
297-
return document.scrollingElement;
299+
return document.documentElement;
298300
}
299301
}
300302
/**
@@ -1631,7 +1633,7 @@
16311633
fallbackTolerance = options.fallbackTolerance,
16321634
fallbackOffset = options.fallbackOffset,
16331635
touch = evt.touches ? evt.touches[0] : evt,
1634-
ghostMatrix = ghostEl && matrix(ghostEl),
1636+
ghostMatrix = ghostEl && matrix(ghostEl, true),
16351637
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
16361638
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
16371639
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
@@ -2136,6 +2138,8 @@
21362138
css(document.body, 'user-select', '');
21372139
}
21382140

2141+
css(dragEl, 'transform', '');
2142+
21392143
if (evt) {
21402144
if (moved) {
21412145
evt.cancelable && evt.preventDefault();
@@ -2400,6 +2404,8 @@
24002404

24012405
this._onDrop();
24022406

2407+
this._disableDelayedDragEvents();
2408+
24032409
sortables.splice(sortables.indexOf(this.el), 1);
24042410
this.el = el = null;
24052411
},
@@ -3540,7 +3546,7 @@
35403546
off(document, 'keyup', this._checkKeyUp);
35413547
},
35423548
_deselectMultiDrag: function _deselectMultiDrag(evt) {
3543-
if (dragStarted) return; // Only deselect if selection is in this sortable
3549+
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
35443550

35453551
if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
35463552

Sortable.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modular/sortable.complete.esm.js

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**!
2-
* Sortable 1.10.1
2+
* Sortable 1.10.2
33
* @author RubaXa <[email protected]>
44
* @author owenm <[email protected]>
55
* @license MIT
@@ -126,7 +126,7 @@ function _nonIterableSpread() {
126126
throw new TypeError("Invalid attempt to spread non-iterable instance");
127127
}
128128

129-
var version = "1.10.1";
129+
var version = "1.10.2";
130130

131131
function userAgent(pattern) {
132132
if (typeof window !== 'undefined' && window.navigator) {
@@ -260,7 +260,7 @@ function matrix(el, selfOnly) {
260260
} while (!selfOnly && (el = el.parentNode));
261261
}
262262

263-
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
263+
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
264264
/*jshint -W056 */
265265

266266
return matrixFn && new matrixFn(appliedTransforms);
@@ -285,10 +285,12 @@ function find(ctx, tagName, iterator) {
285285
}
286286

287287
function getWindowScrollingElement() {
288-
if (IE11OrLess) {
289-
return document.documentElement;
288+
var scrollingElement = document.scrollingElement;
289+
290+
if (scrollingElement) {
291+
return scrollingElement;
290292
} else {
291-
return document.scrollingElement;
293+
return document.documentElement;
292294
}
293295
}
294296
/**
@@ -1625,7 +1627,7 @@ Sortable.prototype =
16251627
fallbackTolerance = options.fallbackTolerance,
16261628
fallbackOffset = options.fallbackOffset,
16271629
touch = evt.touches ? evt.touches[0] : evt,
1628-
ghostMatrix = ghostEl && matrix(ghostEl),
1630+
ghostMatrix = ghostEl && matrix(ghostEl, true),
16291631
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
16301632
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
16311633
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
@@ -2130,6 +2132,8 @@ Sortable.prototype =
21302132
css(document.body, 'user-select', '');
21312133
}
21322134

2135+
css(dragEl, 'transform', '');
2136+
21332137
if (evt) {
21342138
if (moved) {
21352139
evt.cancelable && evt.preventDefault();
@@ -2394,6 +2398,8 @@ Sortable.prototype =
23942398

23952399
this._onDrop();
23962400

2401+
this._disableDelayedDragEvents();
2402+
23972403
sortables.splice(sortables.indexOf(this.el), 1);
23982404
this.el = el = null;
23992405
},
@@ -3534,7 +3540,7 @@ function MultiDragPlugin() {
35343540
off(document, 'keyup', this._checkKeyUp);
35353541
},
35363542
_deselectMultiDrag: function _deselectMultiDrag(evt) {
3537-
if (dragStarted) return; // Only deselect if selection is in this sortable
3543+
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
35383544

35393545
if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
35403546

modular/sortable.core.esm.js

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**!
2-
* Sortable 1.10.1
2+
* Sortable 1.10.2
33
* @author RubaXa <[email protected]>
44
* @author owenm <[email protected]>
55
* @license MIT
@@ -126,7 +126,7 @@ function _nonIterableSpread() {
126126
throw new TypeError("Invalid attempt to spread non-iterable instance");
127127
}
128128

129-
var version = "1.10.1";
129+
var version = "1.10.2";
130130

131131
function userAgent(pattern) {
132132
if (typeof window !== 'undefined' && window.navigator) {
@@ -260,7 +260,7 @@ function matrix(el, selfOnly) {
260260
} while (!selfOnly && (el = el.parentNode));
261261
}
262262

263-
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
263+
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
264264
/*jshint -W056 */
265265

266266
return matrixFn && new matrixFn(appliedTransforms);
@@ -285,10 +285,12 @@ function find(ctx, tagName, iterator) {
285285
}
286286

287287
function getWindowScrollingElement() {
288-
if (IE11OrLess) {
289-
return document.documentElement;
288+
var scrollingElement = document.scrollingElement;
289+
290+
if (scrollingElement) {
291+
return scrollingElement;
290292
} else {
291-
return document.scrollingElement;
293+
return document.documentElement;
292294
}
293295
}
294296
/**
@@ -1625,7 +1627,7 @@ Sortable.prototype =
16251627
fallbackTolerance = options.fallbackTolerance,
16261628
fallbackOffset = options.fallbackOffset,
16271629
touch = evt.touches ? evt.touches[0] : evt,
1628-
ghostMatrix = ghostEl && matrix(ghostEl),
1630+
ghostMatrix = ghostEl && matrix(ghostEl, true),
16291631
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
16301632
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
16311633
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
@@ -2130,6 +2132,8 @@ Sortable.prototype =
21302132
css(document.body, 'user-select', '');
21312133
}
21322134

2135+
css(dragEl, 'transform', '');
2136+
21332137
if (evt) {
21342138
if (moved) {
21352139
evt.cancelable && evt.preventDefault();
@@ -2394,6 +2398,8 @@ Sortable.prototype =
23942398

23952399
this._onDrop();
23962400

2401+
this._disableDelayedDragEvents();
2402+
23972403
sortables.splice(sortables.indexOf(this.el), 1);
23982404
this.el = el = null;
23992405
},
@@ -3536,7 +3542,7 @@ function MultiDragPlugin() {
35363542
off(document, 'keyup', this._checkKeyUp);
35373543
},
35383544
_deselectMultiDrag: function _deselectMultiDrag(evt) {
3539-
if (dragStarted) return; // Only deselect if selection is in this sortable
3545+
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
35403546

35413547
if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
35423548

modular/sortable.esm.js

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**!
2-
* Sortable 1.10.1
2+
* Sortable 1.10.2
33
* @author RubaXa <[email protected]>
44
* @author owenm <[email protected]>
55
* @license MIT
@@ -126,7 +126,7 @@ function _nonIterableSpread() {
126126
throw new TypeError("Invalid attempt to spread non-iterable instance");
127127
}
128128

129-
var version = "1.10.1";
129+
var version = "1.10.2";
130130

131131
function userAgent(pattern) {
132132
if (typeof window !== 'undefined' && window.navigator) {
@@ -260,7 +260,7 @@ function matrix(el, selfOnly) {
260260
} while (!selfOnly && (el = el.parentNode));
261261
}
262262

263-
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
263+
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
264264
/*jshint -W056 */
265265

266266
return matrixFn && new matrixFn(appliedTransforms);
@@ -285,10 +285,12 @@ function find(ctx, tagName, iterator) {
285285
}
286286

287287
function getWindowScrollingElement() {
288-
if (IE11OrLess) {
289-
return document.documentElement;
288+
var scrollingElement = document.scrollingElement;
289+
290+
if (scrollingElement) {
291+
return scrollingElement;
290292
} else {
291-
return document.scrollingElement;
293+
return document.documentElement;
292294
}
293295
}
294296
/**
@@ -1625,7 +1627,7 @@ Sortable.prototype =
16251627
fallbackTolerance = options.fallbackTolerance,
16261628
fallbackOffset = options.fallbackOffset,
16271629
touch = evt.touches ? evt.touches[0] : evt,
1628-
ghostMatrix = ghostEl && matrix(ghostEl),
1630+
ghostMatrix = ghostEl && matrix(ghostEl, true),
16291631
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
16301632
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
16311633
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
@@ -2130,6 +2132,8 @@ Sortable.prototype =
21302132
css(document.body, 'user-select', '');
21312133
}
21322134

2135+
css(dragEl, 'transform', '');
2136+
21332137
if (evt) {
21342138
if (moved) {
21352139
evt.cancelable && evt.preventDefault();
@@ -2394,6 +2398,8 @@ Sortable.prototype =
23942398

23952399
this._onDrop();
23962400

2401+
this._disableDelayedDragEvents();
2402+
23972403
sortables.splice(sortables.indexOf(this.el), 1);
23982404
this.el = el = null;
23992405
},
@@ -3534,7 +3540,7 @@ function MultiDragPlugin() {
35343540
off(document, 'keyup', this._checkKeyUp);
35353541
},
35363542
_deselectMultiDrag: function _deselectMultiDrag(evt) {
3537-
if (dragStarted) return; // Only deselect if selection is in this sortable
3543+
if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
35383544

35393545
if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
35403546

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sortablejs",
33
"exportName": "Sortable",
4-
"version": "1.10.1",
4+
"version": "1.10.2",
55
"devDependencies": {
66
"@babel/core": "^7.4.4",
77
"@babel/plugin-transform-object-assign": "^7.2.0",

0 commit comments

Comments
 (0)