-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Drag gets priority over overlapping elements #296
Comments
The behavior you're describing is controlled by this logic: react-resizable-panels/packages/react-resizable-panels/src/PanelResizeHandleRegistry.ts Lines 168 to 204 in cd32d1c
This Replay shows what's happening: 8c5e2948-00d4-4dd0-a7f7-c11f660ee59f Nearest I can tell, it looks like a bug in the You could try reducing this test case even more and filing an issue in that project's GitHub? Or if you'd like to dig in yourself and submit a PR I'll try to find time to review it. I'm pretty swamped right now though with work and don't have time to dig into this more. |
Thank you for the reply, I'll see what I kind find in that repo, in the meantime I'll try to use a workaround though. |
I had a few minutes this morning so I made a smaller repro and filed Rich-Harris/stacking-order#3 |
Wow thank you so much for taking the time to look at it! Very glad the problem could be located. Looking forward to their response and hopefully a fix since my workaround wasn't so good 😊. |
No problem! Think I found a fix @ Rich-Harris/stacking-order#4 |
Resolves #296 I've proposed an upstream fix for this at Rich-Harris/stacking-order#4 For now, this commit inlines that dependency and applies the fix
Fixed published in 2.0.9 ❤️ → ☕ givebrian.coffee |
Amazing, thanks! |
Hi, thank you for an awesome package!
I have an issue that I thought was similar to #288 but it doesn't seem to be fixed with the latest version 2.0.7. I have an overlapping button element that I want to be able to click and collapse a drawer. However, the draggable border gets priority even though the Z-index on the button is above.
This can be partially solved by moving the button outside of the resizable components (although it makes the positioning of the button troublesome), but when the button contains only an icon and not text, the drag gets priority again. The button is although still clickable.
If the button contains text and is outside of the resizable components it works as expected, but the positioning of the button is again cumbersome.
It's difficult to explain, so I reproduced a simple example it in the sandbox below:
https://codesandbox.io/p/sandbox/react-resizable-panels-forked-s5jzpg
The text was updated successfully, but these errors were encountered: