diff --git a/src/views.js b/src/views.js index e83f3d6..94dcc7a 100644 --- a/src/views.js +++ b/src/views.js @@ -587,7 +587,8 @@ function _setupReorderMode(container, songs, pl) { } export function plReorderEnter() { - if (!_reorderCtx) return; + if (!_reorderCtx || _reorderCtx.active) return; + _reorderCtx.active = true; const { container, songs } = _reorderCtx; container.classList.add('pl-draggable'); // Block context-menu (long-press) on all items while reordering. @@ -684,6 +685,7 @@ export function plReorderCancel() { _exitReorderMode(false); } function _exitReorderMode(save) { if (!_reorderCtx) return; const { container, songs, pl } = _reorderCtx; + _reorderCtx.active = false; container.classList.remove('pl-draggable'); container.removeEventListener('contextmenu', _blockCtxMenu, true); container.querySelectorAll('.pl-drag-handle').forEach(h => h.remove());