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

Ignore single left click on tabs panel when context menu is open #1141

Conversation

emvaized
Copy link
Contributor

This PR applies this patch for single left click on tabs panel as well.

It also removes the check for native context menu. The problem, which original patch (as per my understanding) tries to solve, happens to me with native context menu enabled as well — when I have context menu open and perform left click outside in order to close it, the click event gets passed to the Sidebery element under cursor. It happens to me on Windows 11 with "Native context menu" option enabled. And it doesn't happen without the "native menu" check — I think it's not needed anyway, as in the case when left click gets consumed by native context menu's overlay or backdrop (and such context menu gets closed), Sidebery should not receive this event anyway.

@mbnuqw
Copy link
Owner

mbnuqw commented Jul 28, 2023

when I have context menu open and perform left click outside in order to close it, the click event gets passed to the Sidebery element under cursor. It happens to me on Windows 11 Damn, that means that I have to add system-specific logic, because on linux (x11) there is no such event and sidebery keeps thinking that the menu is open which leads to an extra click (3 clicks in general) to activate a tab. Or maybe I'll reset Menu.isOpen flag after 1s after opening native context menu (which will also reset selection of target element, but it's ok).

@mbnuqw mbnuqw merged commit dca82c9 into mbnuqw:v5 Jul 28, 2023
@emvaized
Copy link
Contributor Author

which will also reset selection of target element

Wouldn't this break functionality when user selected multiple tabs and triggered context menu on them?

@mbnuqw
Copy link
Owner

mbnuqw commented Jul 28, 2023

No, b/c this (resetting selection) will happen after showing context menu. Anyway, it doesn't matter anymore, I decided to not reset selection since it will be reset after next mouse click or focusOut.

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.

2 participants