|
1 | 1 | /**! |
2 | | - * Sortable 1.15.4 |
| 2 | + * Sortable 1.15.5 |
3 | 3 | * @author RubaXa <trash@rubaxa.org> |
4 | 4 | * @author owenm <owen23355@gmail.com> |
5 | 5 | * @license MIT |
@@ -128,7 +128,7 @@ function _nonIterableSpread() { |
128 | 128 | throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
129 | 129 | } |
130 | 130 |
|
131 | | -var version = "1.15.4"; |
| 131 | +var version = "1.15.5"; |
132 | 132 |
|
133 | 133 | function userAgent(pattern) { |
134 | 134 | if (typeof window !== 'undefined' && window.navigator) { |
@@ -1408,13 +1408,13 @@ Sortable.prototype = /** @lends Sortable.prototype */{ |
1408 | 1408 | on(rootEl, 'dragstart', this._onDragStart); |
1409 | 1409 | } |
1410 | 1410 | try { |
1411 | | - _nextTick(function () { |
1412 | | - if (document.selection) { |
| 1411 | + if (document.selection) { |
| 1412 | + _nextTick(function () { |
1413 | 1413 | document.selection.empty(); |
1414 | | - } else { |
1415 | | - window.getSelection().removeAllRanges(); |
1416 | | - } |
1417 | | - }); |
| 1414 | + }); |
| 1415 | + } else if (this.nativeDraggable) { |
| 1416 | + window.getSelection().removeAllRanges(); |
| 1417 | + } |
1418 | 1418 | } catch (err) {} |
1419 | 1419 | }, |
1420 | 1420 | _dragStarted: function _dragStarted(fallback, evt) { |
@@ -1630,6 +1630,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{ |
1630 | 1630 | _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt)); |
1631 | 1631 | on(document, 'selectstart', _this); |
1632 | 1632 | moved = true; |
| 1633 | + window.getSelection().removeAllRanges(); |
1633 | 1634 | if (Safari) { |
1634 | 1635 | css(document.body, 'user-select', 'none'); |
1635 | 1636 | } |
|
0 commit comments