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

Create one-time mouseup listener for each mousedown #1697

Merged
merged 2 commits into from Nov 2, 2022

Conversation

scuml
Copy link
Contributor

@scuml scuml commented Nov 2, 2022

Move the creation on the mouseup event handler to inside the mousedown and add {once: true} so that is is removed after each use. This prevents multiple mouseup events from getting attached to document (which breaks mouseup behavior) when using libraries that update page content without reloading the page like Hotwire Turbo, htmx, and Unpoly.

@tim-schilling tim-schilling merged commit 8e3335a into jazzband:main Nov 2, 2022
@tim-schilling
Copy link
Contributor

Thanks for the PR and cleaning up my mess!

@scuml
Copy link
Contributor Author

scuml commented Nov 2, 2022

Thanks for the fast review @tim-schilling !

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

Successfully merging this pull request may close these issues.

None yet

2 participants