-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbe052e
commit 3008c7a
Showing
3 changed files
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/**! | ||
* Sortable 1.14.0 | ||
* Sortable 1.15.0 | ||
* @author RubaXa <[email protected]> | ||
* @author owenm <[email protected]> | ||
* @license MIT | ||
|
@@ -166,7 +166,7 @@ | |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
|
||
var version = "1.14.0"; | ||
var version = "1.15.0"; | ||
|
||
function userAgent(pattern) { | ||
if (typeof window !== 'undefined' && window.navigator) { | ||
|
@@ -1173,7 +1173,7 @@ | |
}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position | ||
|
||
|
||
if (documentExists) { | ||
if (documentExists && !ChromeForAndroid) { | ||
document.addEventListener('click', function (evt) { | ||
if (ignoreNextClick) { | ||
evt.preventDefault(); | ||
|
@@ -1792,6 +1792,7 @@ | |
|
||
if (!Sortable.eventCanceled) { | ||
cloneEl = clone(dragEl); | ||
cloneEl.removeAttribute("id"); | ||
cloneEl.draggable = false; | ||
cloneEl.style['will-change'] = ''; | ||
|
||
|
@@ -2033,7 +2034,14 @@ | |
|
||
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) { | ||
capture(); | ||
el.appendChild(dragEl); | ||
|
||
if (elLastChild && elLastChild.nextSibling) { | ||
// the last draggable element is not the last node | ||
el.insertBefore(dragEl, elLastChild.nextSibling); | ||
} else { | ||
el.appendChild(dragEl); | ||
} | ||
|
||
parentEl = el; // actualization | ||
|
||
changed(); | ||
|
@@ -3178,18 +3186,21 @@ | |
} | ||
} | ||
|
||
if (sortable.options.supportPointer) { | ||
on(document, 'pointerup', this._deselectMultiDrag); | ||
} else { | ||
on(document, 'mouseup', this._deselectMultiDrag); | ||
on(document, 'touchend', this._deselectMultiDrag); | ||
if (!sortable.options.avoidImplicitDeselect) { | ||
if (sortable.options.supportPointer) { | ||
on(document, 'pointerup', this._deselectMultiDrag); | ||
} else { | ||
on(document, 'mouseup', this._deselectMultiDrag); | ||
on(document, 'touchend', this._deselectMultiDrag); | ||
} | ||
} | ||
|
||
on(document, 'keydown', this._checkKeyDown); | ||
on(document, 'keyup', this._checkKeyUp); | ||
this.defaults = { | ||
selectedClass: 'sortable-selected', | ||
multiDragKey: null, | ||
avoidImplicitDeselect: false, | ||
setData: function setData(dataTransfer, dragEl) { | ||
var data = ''; | ||
|
||
|
@@ -3480,7 +3491,7 @@ | |
rootEl: rootEl, | ||
name: 'select', | ||
targetEl: dragEl$1, | ||
originalEvt: evt | ||
originalEvent: evt | ||
}); // Modifier activated, select from last to dragEl | ||
|
||
if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) { | ||
|
@@ -3509,7 +3520,7 @@ | |
rootEl: rootEl, | ||
name: 'select', | ||
targetEl: children[i], | ||
originalEvt: evt | ||
originalEvent: evt | ||
}); | ||
} | ||
} | ||
|
@@ -3526,7 +3537,7 @@ | |
rootEl: rootEl, | ||
name: 'deselect', | ||
targetEl: dragEl$1, | ||
originalEvt: evt | ||
originalEvent: evt | ||
}); | ||
} | ||
} // Multi-drag drop | ||
|
@@ -3637,7 +3648,7 @@ | |
rootEl: this.sortable.el, | ||
name: 'deselect', | ||
targetEl: el, | ||
originalEvt: evt | ||
originalEvent: evt | ||
}); | ||
} | ||
}, | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.