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

feature: workflow for de-duplicating mouse events when within a given zone #10

Open
lrstanley opened this issue Nov 6, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@lrstanley
Copy link
Owner

lrstanley commented Nov 6, 2022

✨ Describe the feature you'd like

A way with BubbleZone to reduce the chance of duplicated clicks being sent.

🌧 Is your feature request related to a problem?

Today, when holding one of the mouse buttons (and dragging), BubbleTea emits multiple events for each cell that the mouse has dragged over. The common way that I think most people use BubbleZone, where it's a simple bounds check, will be subject to situations where a user might intend on clicking something, then causing a drag during the clicking process (this isn't an issue unless they drag over a column/row boundary).


Not sure what the best approach to address this issue. Ideally, if we could capture a mouseup event, that is specific to left or right, I think that would be the ideal situation, rather than mousedown. A mousedown event can be triggered multiple times due to dragging, whereas I don't think mouseup would.

Today, I believe mouseup isn't specific to left/right.

Below screenshot shows an example of drag causing multiple events:


Maybe if the developer does an action based on a zone + mouse event, we have some way of caching that? And if we receive a mouseup event, we clear that cache? This would mean that unless we receive a mouseup event, we could have a way of checking if we've already done an action from mousedown for that zone?

@lrstanley lrstanley added the enhancement New feature or request label Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant