Skip to content

Commit ca13d2c

Browse files
committed
#2410: clear selection after drag start only with fallback
1 parent 62f0498 commit ca13d2c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Sortable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,10 +715,13 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
715715
}
716716

717717
try {
718-
_nextTick(function () {
718+
if (this.nativeDraggable) {
719+
window.getSelection().removeAllRanges();
720+
}
721+
_nextTick(() => {
719722
if (document.selection) {
720723
document.selection.empty();
721-
} else {
724+
} else if (!this.nativeDraggable) {
722725
window.getSelection().removeAllRanges();
723726
}
724727
});

0 commit comments

Comments
 (0)