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

[Recreated with correct codepen link] Panels do not consistently collapse when they are up against the edge of the viewport #117

Closed
incompl opened this issue Mar 30, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@incompl
Copy link

incompl commented Mar 30, 2023

Here is a codesandbox that reproduces the issue: https://codesandbox.io/s/react-resizable-panels-forked-8c8qpo

Here is a video of the issue using the above codesandbox:

rrpissuesml.mov
@bvaughn
Copy link
Owner

bvaughn commented Mar 30, 2023

Looks like it's a matter of mousing too quickly– such that the last "mousemove" event that fires is not lower than the panel's collapse threshold, and then the mouse has already exited the window (or in this case the iframe) so no more move events are fired.

@incompl
Copy link
Author

incompl commented Mar 30, 2023

I see, makes sense! Is it possible to disable the drag-to-collapse behavior to avoid this issue, and instead relying entirely on programmatic expand/collapse using buttons?

@bvaughn
Copy link
Owner

bvaughn commented Mar 30, 2023

Yes, you could do that.

I think this is probably also a bug that this library should handle better though. Perhaps we should also listen for an event where the mouse leaves the viewport too

@bvaughn bvaughn added the bug Something isn't working label Mar 30, 2023
@bvaughn
Copy link
Owner

bvaughn commented Apr 2, 2023

Fixed in 1638ede.

@bvaughn bvaughn closed this as completed Apr 2, 2023
@bvaughn
Copy link
Owner

bvaughn commented Apr 2, 2023

0.0.38

@incompl
Copy link
Author

incompl commented Apr 3, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants