Skip to content

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

@exceedsystem

Description

@exceedsystem

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: Linux: native context menu runs action under mouse when opened 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".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions