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

Implement click events #43

Open
JoshKarpel opened this issue Oct 8, 2023 · 1 comment
Open

Implement click events #43

JoshKarpel opened this issue Oct 8, 2023 · 1 comment
Labels
enhancement New feature or request input

Comments

@JoshKarpel
Copy link
Owner

https://stackoverflow.com/questions/14805225/whats-the-difference-between-mouseup-and-click-events

@JoshKarpel JoshKarpel self-assigned this Oct 8, 2023
@JoshKarpel JoshKarpel added the enhancement New feature or request label Dec 26, 2023
@JoshKarpel JoshKarpel removed their assignment Dec 27, 2023
@JoshKarpel
Copy link
Owner Author

JoshKarpel commented Feb 17, 2024

#112 means you can sort of implement click events in user space with a use_state that tracks whether the element was mouse-downed, and a handler for both mouse down and up events. But it's not clear how you'd clear the click state if the button is released over another element - that might be the main reason to push this into the framework.

Typical browser behavior is that it's a click if-and-only-if the mouse down and corresponding up happen on the same element - but it doesn't matter whether the mouse moves across any other elements between those events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request input
Projects
None yet
Development

No branches or pull requests

1 participant