[Bug] LMB trigger buttons even when disabled
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:
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.
Please let me know if the LMB works correctly in latest test build from this comment
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.
Is it with Hide menu on mouse up if nothing selected still disabled?
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!
It seems RMB has an
onPresstriggerEventand LMB anonRelease
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.
I suddenly realised that your issues might be caused by interference with Vivaldi's own build-in mouse gestures, which are enabled by default:
Could you try disabling them and check if problems dissapeared?
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.