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

Clicking a select in a draggable item still drags the item on Firefox #707

Open
glecetre opened this issue May 17, 2024 · 2 comments
Open

Comments

@glecetre
Copy link

Hello 👋 here's a bug report with <select/> elements in draggable items, only observed on Firefox. Thanks for this lib!

Repro steps

Here's a codesandbox showing the bug.

  1. On Firefox, have a container where one or more items have a <select/>
  2. Click a <select/> to open its options
  3. Don't select any option and move the mouse up/down

Expected result

The item containing the <select /> shouldn't be considered to be dragged and shouldn't move.

Actual result

The item moves around with the mouse.

@glecetre
Copy link
Author

glecetre commented May 17, 2024

I think I have found the reason why this happens: Firefox doesn't seem to fire the mouseup and click events on the select element until after an option has been selected, so Dragula doesn't release the item and moves it while the select options are displayed.

Edit: seems no to be that because Safari fires the same events as Firefox, yet it works correctly.

@tobika
Copy link

tobika commented Jun 18, 2024

I had problems of dragula taking over some click events, it was because the button was covered by a dragula item, with z-index pushing the button over the drag container the events worked as expected.

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

No branches or pull requests

2 participants