Skip to content

issue-2359: fix drag and drop one pixel before slot start case#2383

Closed
the-nelsonator wants to merge 1 commit into
mbnuqw:v5from
the-nelsonator:issue-2359
Closed

issue-2359: fix drag and drop one pixel before slot start case#2383
the-nelsonator wants to merge 1 commit into
mbnuqw:v5from
the-nelsonator:issue-2359

Conversation

@the-nelsonator
Copy link
Copy Markdown
Contributor

@the-nelsonator the-nelsonator commented Mar 31, 2026

Fixes #2359

If group you're dragging a tab onto is at index 3 and then in drag-and-drop.fg.ts#onDragMove

  y = bounds[3].start - 1

DnD.reactive.dstParentId isn't set, so remains -1, so DnD results in tab being moved to bottom/top of panel depending on config.

Changes allows execution to make it to // Inside section when this happens. It handles as expected then.

I'm not sure if there's a more elegant fix or if this covers all cases, but this seems to fix this one particular case. If you can find a superset of cases feel free to discard for a better fix.

@the-nelsonator the-nelsonator changed the title issue-2359: fix one-pixel before slot start case issue-2359: fix drag and drop one pixel before slot start case Mar 31, 2026
@mbnuqw
Copy link
Copy Markdown
Owner

mbnuqw commented Apr 5, 2026

Thanks. This PR has an issue: when slowly dragging a tab the pointer suddenly jumps to the next slot in "inside" mode.

@mbnuqw
Copy link
Copy Markdown
Owner

mbnuqw commented Apr 5, 2026

And I still can repro the original issue.

@mbnuqw
Copy link
Copy Markdown
Owner

mbnuqw commented Apr 5, 2026

Ok, I found out that a blind zone is not just a pixel but a range from slot.bottom to slot.end.

@mbnuqw mbnuqw closed this in a31297a Apr 5, 2026
@the-nelsonator
Copy link
Copy Markdown
Contributor Author

the-nelsonator commented Apr 9, 2026

Thanks for the proper fix! :)

@the-nelsonator the-nelsonator deleted the issue-2359 branch April 9, 2026 09:18
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.

Drag and drop on a group sometimes results in tree being moved to bottom of panel

2 participants