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

[Bug] LMB trigger buttons even when disabled #32

Open
PhilJbt opened this issue Nov 5, 2024 · 8 comments
Open

[Bug] LMB trigger buttons even when disabled #32

PhilJbt opened this issue Nov 5, 2024 · 8 comments

Comments

@PhilJbt
Copy link

PhilJbt commented Nov 5, 2024

When the option Hide menu on mouse up if nothing selected is disabled and Open menu on is set on Right click, LMB triggers buttons, but they do not work correctly. (v1.5)

I found this bug accidentally because it was more intuitive to me to use RMB to open the menu and LMB to select buttons. Be able to choose which mouse button between RMB and LMB triggers menu's buttons when the Hide menu on mouse up if nothing selected is disabled would be great.

In this example, the menu opening is set on RMB. Select the "search" button with RMB works, but with LMB the {selection} parameter is empty, resulting in a redirect to the Google homepage:

2024-11-05.11-41-37.webm
@emvaized
Copy link
Owner

emvaized commented Nov 8, 2024

Thanks for your detailed report!

Sure, it looks like an oversight that LMB doesn't proccess the selected action correctly. I'll take a look at it when I will have free time.

@emvaized
Copy link
Owner

emvaized commented Nov 9, 2024

Please let me know if the LMB works correctly in latest test build from this comment

@PhilJbt
Copy link
Author

PhilJbt commented Nov 9, 2024

With the test_2 build, when the menu is set up to RMB, click on a menu's button with LMB closes the menu without triggering anything.

@emvaized
Copy link
Owner

emvaized commented Nov 9, 2024

Is it with Hide menu on mouse up if nothing selected still disabled?

@PhilJbt
Copy link
Author

PhilJbt commented Nov 9, 2024

Hide menu on mouse up if nothing selected was enabled.

  • Disabled:

    • LMB = trigger, fail ❌
    • RMB = trigger, success ✔
    • Both = not triggered, close the menu ⚠
  • Enabled:

    • Both = not triggered, close the menu ⚠
    • RMB = trigger, success ✔

It seems RMB has an onPress triggerEvent and LMB an onRelease ? This is a detail, but use both should not close the menu. In this case, this could help you handle unexpected behavior by triggering a menu's button only if either LMB or RMB is pressed and then released. If at release, the other MB was previously registered as pressed, the menu should not disappear. But this may not help you at all in any way!

2024-11-09.18-25-48.webm

@emvaized
Copy link
Owner

emvaized commented Nov 9, 2024

It seems RMB has an onPress triggerEvent and LMB an onRelease

Yes, in this build I added additional logic to mouse down event for the left mouse button. It probably collides with the existing logic to show the regular context menu on right click when left mouse button is held.

@emvaized
Copy link
Owner

I suddenly realised that your issues might be caused by interference with Vivaldi's own build-in mouse gestures, which are enabled by default:

illustration

Could you try disabling them and check if problems dissapeared?

@PhilJbt
Copy link
Author

PhilJbt commented Nov 13, 2024

I disabled both Vivaldi's MG when I installed CMG. You can't imagine how fast things went wild!
But thank you; I appreciate your thoughtfulness.

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

2 participants