Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support overlapping Droppables via z-index prioritization #668

Open
oliver-goh opened this issue Sep 12, 2023 · 1 comment · May be fixed by #669
Open

Support overlapping Droppables via z-index prioritization #668

oliver-goh opened this issue Sep 12, 2023 · 1 comment · May be fixed by #669
Assignees
Labels
enhancement New feature or request

Comments

@oliver-goh
Copy link

oliver-goh commented Sep 12, 2023

Expected behavior

Regarding Droppables that are overlapping, the Droppable with the highest z-index should be selected.

Related issues:

Actual behavior

The library does not support such behaviour, as can be seen here, it uses getFurthestAway when there are multiple candidates.

Steps to reproduce

Droppable of the same type wrapped by a parent Droppable.
See Before CodeSandbox in Demo

Suggested solution?

When there are multiple candidates, select candidate with highest zIndex. See #669

What version of React are you using?

^17.0.0

What version of @hello-pangea/dnd are you running?

16.3.0

What browser are you using?

Google Chrome

Demo

Before

https://codesandbox.io/s/overlapping-droppables-before-hts23l

Screen.Recording.2023-09-12.at.14.26.33.mov
After

https://codesandbox.io/s/overlapping-droppables-z-index-n833f6

Screen.Recording.2023-09-12.at.14.33.54.mov
@100terres
Copy link
Collaborator

@oliver-goh, thank you for your suggestion. I'll do some investigation and see what I can do. I'm not making any promises, but hopefully, we'll be able to make improvements to the dropping mechanism when this scenario presents itself.

@100terres 100terres added the enhancement New feature or request label Nov 11, 2023
@100terres 100terres self-assigned this Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants