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

Idea: Avoid triggering popup menu action from mouse-release shortly after mouse-press #963

Open
eirikbakke opened this issue Jan 27, 2025 · 0 comments

Comments

@eirikbakke
Copy link
Contributor

On Windows, popup menus appear when releasing the right-click button. On MacOS, they appear when pressing the right-click button. FlatLAF correctly follows this behavior on each platform.

There's a usability problem on MacOS, though. If the user moves the cursor towards the intended menu item, and happens to release the mouse button while the cursor is now over another menu item, then the latter action will be executed instead of the intended one. I make this mistake myself quite often when working quickly (with an external mouse, not a trackpad). See the screen recording below:

https://youtube.com/shorts/RzlnnRMP8J8

Proposal: In a JMenuItem, ignore a right-button mouse-release event for action triggering purposes if it comes within a short duration of the corresponding mouse-press event (e.g. 250ms).

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

1 participant