Skip to content

Wishlist reorder: restrict drag to handle only#52

Merged
JoeProgrammer88 merged 2 commits intomainfrom
copilot/fix-wishlist-reorder-issue
Mar 24, 2026
Merged

Wishlist reorder: restrict drag to handle only#52
JoeProgrammer88 merged 2 commits intomainfrom
copilot/fix-wishlist-reorder-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

Accidental reorders triggered whenever users clicked and dragged anywhere on a wish item — including mid-item scroll gestures. Drag should only activate from the left-side handle (⠿).

Changes

Desktop (HTML5 drag)

  • draggable="false" on .wish-item by default; toggled to true only on mousedown of .wish-drag-handle
  • A self-removing document mouseup listener resets draggable regardless of where the mouse is released
  • dragend also resets draggable as a fallback

Mobile (touch)

  • Added touchStartedOnHandle flag — touch drag activation in touchmove is gated on the touch having originated on the handle; touches elsewhere fall through to normal scroll

CSS

  • Removed cursor: grab from .wish-item; grab cursor now only appears on .wish-drag-handle
handle.addEventListener('mousedown', () => {
    el.setAttribute('draggable', 'true');
    const resetDraggable = () => {
        el.setAttribute('draggable', 'false');
        document.removeEventListener('mouseup', resetDraggable);
    };
    document.addEventListener('mouseup', resetDraggable);
});
Original prompt

This section details on the original issue you should resolve

<issue_title>Wish list reorder</issue_title>
<issue_description>Users are frustrated because items in the wishlist get accidentally reordered. When clicking and dragging from the left side handle, the user should be able to rearrange things. If they are clicking and scrolling in the middle, they are just trying to scroll the page, not reorder items</issue_description>

Comments on the Issue (you are @copilot in this section)


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Copilot AI changed the title [WIP] Fix accidental reordering in wishlist Wishlist reorder: restrict drag to handle only Mar 24, 2026
Copilot AI requested a review from JoeProgrammer88 March 24, 2026 02:41
@JoeProgrammer88 JoeProgrammer88 marked this pull request as ready for review March 24, 2026 02:44
@JoeProgrammer88 JoeProgrammer88 merged commit c5cdc95 into main Mar 24, 2026
1 check passed
@JoeProgrammer88 JoeProgrammer88 deleted the copilot/fix-wishlist-reorder-issue branch March 24, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wish list reorder

2 participants