From cb55c3f0e7f6725d973f319baf45892aa88d0f6f Mon Sep 17 00:00:00 2001 From: Owen Mills Date: Sun, 10 Nov 2024 21:41:41 +0000 Subject: [PATCH] always disable user-select during fallback drag --- src/Sortable.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Sortable.js b/src/Sortable.js index 81ff84494..e2dab5ac5 100644 --- a/src/Sortable.js +++ b/src/Sortable.js @@ -137,6 +137,7 @@ let dragEl, ghostRelativeParentInitialScroll = [], // (left, top) _silent = false, + userSelect = '', savedInputChecked = []; /** @const */ @@ -984,7 +985,8 @@ Sortable.prototype = /** @lends Sortable.prototype */ { moved = true; - if (Safari) { + if (fallback) { + userSelect = css(document.body, 'user-select'); css(document.body, 'user-select', 'none'); } }, @@ -1380,8 +1382,8 @@ Sortable.prototype = /** @lends Sortable.prototype */ { this._offUpEvents(); - if (Safari) { - css(document.body, 'user-select', ''); + if (!this.nativeDraggable) { + css(document.body, 'user-select', userSelect); } css(dragEl, 'transform', '');