electron: [Bug]: The context-menu is sometimes selected unintentionally

Preflight Checklist

Electron Version

15.3.0

What operating system are you using?

Other (specify below)

Operating System Version

OpenSUSE 15.3(Kernel 5.3.18-59.27-default)

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Context menu selection should be done when you explicitly click on an item.

Actual Behavior

When there are many items in the context-menu and the corner of the menu is not next to the mouse cursor, the menu item may be selected unintentionally on Linux systems due to the mouse button up event.

Peek 2021-10-31 11-19

Testcase Gist URL

https://gist.github.com/d9cca97cbfb450d0ad151b193aaf6a98

Additional Information

  • Related: microsoft/vscode#113175

  • My display(DELL S3221QS) pixels are not square.

    xdpyinfo | grep -B2 resolution
    screen #0:
      dimensions:    3840x2160 pixels (702x400 millimeters)
      resolution:    139x137 dots per inch
    
  • This issue is still occurring even if I fix the DPI to 120 or 144 in .Xresources or xorg.conf’.

  • I don’t have this problem on my other Debian Linux system (Apple cinema LED display/2560x1440 pixels, 96x96dpi). However, the same problem occurred when I forced the DPI to change to “137” in “.Xresources”.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 35
  • Comments: 34 (8 by maintainers)

Most upvoted comments

I used https://gist.github.com/d9cca97cbfb450d0ad151b193aaf6a98 to try & reproduce the issue, but I’m not sure what I’m looking at – things seem to be working as expected and it’s not clear to me from @exceedsystem’s gif where the issue is. Could someone help me to understand what exactly is going wrong, and how to reproduce it?

The problem is that right clicking the mouse, the menu appear directly under the pointer, so releasing the right click will also click the element directly under the pointer.

bump

bump

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, “bump”), and we’ll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, “bump”), and we’ll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

Bump, still not fixed