Right click / context menu item is immediately triggered when popping up under cursor
Steps to reproduce
- Set the window resolution to something small or increase zoom in the compositor. I use
swaymsg output '*' zoom 1.5
for Sway. - Open an app that has context menus with lots of entries, like Firefox.
- Scroll a link to the center of the screen.
- Right click. Pointer device shouldn't matter. I've reproduced it with a Wacom touch tablet and a standard mouse.
Current behavior
If the menu pops up so that it is right underneath the cursor, it should receive the mouse up event and trigger one of the entries. Which one? It's always a surprise.
Expected outcome
The menu should stay open and wait for the next input.
Version information
On Guix where I am testing right now, it's GTK 3.24.30, but I'm pretty sure I've run into it on Alpine/PostmarketOS as well. If you want to reproduce it on Guix, one commit you could time-machine to is 1266b9e.
Additional information
If the description is unclear I can figure out how to record it later.
ps.: I looked through the other context menu related issues and I'm fairly certain this isn't a duplicate, but it's possible I missed something.