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

[Firefox] Releasing mouse over a button after dragging sash causes button click #804

Open
laurenga opened this issue May 20, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@laurenga
Copy link

Found in Firefox (v126): Using the demo at https://allotment.mulberryhousesoftware.com/

Drag the divider between allotment.tsx and allotment.module.css to the left and keep the left mouse button depressed until it's over the a file listing (such as allotment.tsx) then release the mouse.

This results in a new pane being opened for allotment.tsx

This behavior does not happen in Chrome.

@laurenga
Copy link
Author

I've found I can use the onDragStart and onDragEnd events to keep track of when the drag occurs. However, then I need to update all the buttons to be aware of the drag.

It would be a lot better if I could access the drag event so that default actions or event bubbling could be prevented.

@johnwalley
Copy link
Owner

@laurenga Thanks for reporting this. I can reproduce it so that's a good start!

I can't commit to a timescale for fixing this. There's a chance it's really simple, but there's also a good chance it's a tricky browser behaviour thing, e.g. w3c/pointerevents#75.

I'll also consider adding an onDrag callback to accompany the onDragStart and onDragEnd callbacks

@johnwalley johnwalley self-assigned this May 22, 2024
@johnwalley johnwalley added the bug Something isn't working label May 22, 2024
@laurenga
Copy link
Author

Thank you for taking a look. I'm hopeful it's something simple. I wonder if event.preventDefault() on the drag event is enough to help with it.

@johnwalley
Copy link
Owner

I did try spamming all of preventDefault(), stopPropogration(), and stopImmediatePropogration() in a few places just to see if there was any effect. I'll see what I can do when I get a chance to take a more thoughtful look.

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