Fix stuck grab cursor on aborted drag
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
release-please / release-please (push) Canceled after 0s

When dragging is aborted by returning false from the sortable 'start' handler, the cursor plugin never fires its cleanup, leaving the body cursor stuck on 'grabbing'. Reset the body cursor explicitly on each early-return path.
This commit is contained in:
jelveh
2026-07-26 23:29:33 -07:00
parent 30461e7d95
commit a1c8ba4cdd
+7
View File
@@ -2622,13 +2622,20 @@ const TabFiles = {
revertDuration: 100,
start: function (_event, ui) {
// Returning false from here aborts the drag but skips the
// "stop" plugins, so the cursor plugin never restores the
// body cursor it already set to 'grabbing' — reset it on
// every abort path or the hand cursor sticks.
// Don't start drag if item wasn't already selected before mousedown;
// rubberband selection should handle this case instead.
if ( ! itemWasSelectedOnMousedown ) {
$('body').css('cursor', '');
return false;
}
if ( $(el_item).attr('data-immutable') !== '0' ) {
$('body').css('cursor', '');
return false;
}