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

Allow slow clicks in the UI #2859

Open
Tracked by #2670
martenbjork opened this issue Jul 28, 2023 · 2 comments
Open
Tracked by #2670

Allow slow clicks in the UI #2859

martenbjork opened this issue Jul 28, 2023 · 2 comments
Labels
egui Requires egui/eframe work ui concerns graphical user interface

Comments

@martenbjork
Copy link
Contributor

martenbjork commented Jul 28, 2023

Maybe this is an EGUI implementation decision — I'm curious to learn more.

When clicking things in Rerun, the click "times out" after ~750ms.

✅ Working: Mousedown, wait 100ms, mouse up = Click is registered
❌ Not working: Mousedown, wait 1000ms, mouse up = Click is not registered

If you slow-click an interactive element, like the > Blueprints toggle in the selection view, you can see this behavior in action. After ~750ms, the visual click state disappears as if your click has been cancelled.

Is there good rationale for this? I often slow-click, when I suddenly have doubt about whether I want to go through with the click. (Mousedown => Haaaaang on... => drag mouse outside control => release => phew!)

@abey79
Copy link
Member

abey79 commented Jul 28, 2023

Well spotted!

The phenomenon definitely deserve investigation. That said, I think those header would benefit from registering mouse down instead of up, like #2858.

@emilk
Copy link
Member

emilk commented Aug 8, 2023

Yes, this is currently hardcoded in egui:

The rational is that we need some way to distinguish a click from a drag. If the user clicks and holds an element, egui assumes you are intending to drag it.

@emilk emilk added the egui Requires egui/eframe work label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui Requires egui/eframe work ui concerns graphical user interface
Projects
None yet
Development

No branches or pull requests

3 participants