Skip to content

fix(ui): sub-mailbox drops blocked by parent cascade#12964

Open
ChristophWurst wants to merge 1 commit into
mainfrom
fix/drag-drop-disabled-submailbox
Open

fix(ui): sub-mailbox drops blocked by parent cascade#12964
ChristophWurst wants to merge 1 commit into
mainfrom
fix/drag-drop-disabled-submailbox

Conversation

@ChristophWurst
Copy link
Copy Markdown
Member

Two bugs in the droppable-mailbox directive:

  1. [droppable-mailbox="disabled"] applied pointer-events:none and opacity:.3 to the whole element, cascading into sub-mailboxes rendered in the slot and making them unreachable as drop targets.

  2. With pointer-events:none unscoped, drag events reached the wrapper div of disabled mailboxes; onDragLeave unconditionally called setStatus('enabled'), visually re-enabling them mid-drag.

Scope the disabled styling to > div > a (matching the dragover state) and add canBeDropped() guards to onDragOver/onDragLeave/onDrop.

Partly introduced by #12650. cc @cdvv7788

How to test

  1. Create a mailbox structure mb1 > mb1.1 > mb1.1.1 (parent - child - grand child)
  2. Move an email into mb1
  3. Open mb1
  4. Try to drag and drop that email into mb1.1 or mb1.1.1

main: they are disabled
here: they are enabled

Assisted-by: Claude:claude-sonnet-4-6

Two bugs in the droppable-mailbox directive:

1. [droppable-mailbox="disabled"] applied pointer-events:none and opacity:.3
   to the whole element, cascading into sub-mailboxes rendered in the slot
   and making them unreachable as drop targets.

2. With pointer-events:none unscoped, drag events reached the wrapper div of
   disabled mailboxes; onDragLeave unconditionally called setStatus('enabled'),
   visually re-enabling them mid-drag.

Scope the disabled styling to > div > a (matching the dragover state) and
add canBeDropped() guards to onDragOver/onDragLeave/onDrop.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
@ChristophWurst
Copy link
Copy Markdown
Member Author

/backport to stable5.8

@ChristophWurst
Copy link
Copy Markdown
Member Author

/backport to stable5.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant