microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.96k stars 29.18k forks source link

context menu appears under mouse #162249

Closed beauxq closed 2 years ago

beauxq commented 2 years ago

Type: Bug

When I right-click in the code editor, the position of the context menu puts one of the menu selections under my mouse pointer, so when I release the click, the menu option that happened to be at the location of the mouse pointer is selected.

I've used a device input logger to make sure I am not moving the mouse between press and release. I've compared the behavior with other applications on the same computer, and the problem doesn't happen.

In a good design, any clickable item in the menu would be at least a few pixels away from where the mouse pointer is, so that the mouse pointer is not over one of the menu options.

To reproduce:

right click in editor to open context menu

Expected:

context menu is open

Actual:

context menu is closed and an arbitrary option in the menu has been activated


VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:12:14.256Z) OS version: Linux x64 5.15.0-48-generic Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (4 x 3500)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|3, 2, 2| |Memory (System)|7.65GB (1.30GB free)| |Process Argv|--unity-launch --crash-reporter-id 282f5459-03d5-4146-a5c1-5cf222b3f089| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|x11|
Extensions (56) Extension|Author (truncated)|Version ---|---|--- language-x86-64-assembly|13x|3.0.0 atlascode|atl|2.10.12 language-gas-x86|bas|0.0.2 djinni-syntax-highlighting|cro|1.2.0 doxdocgen|csc|1.4.0 dart-code|Dar|3.48.4 flutter|Dar|3.48.0 vscode-eslint|dba|2.2.6 vscode-wasm|dts|1.3.1 gitlens|eam|12.2.2 go|gol|0.35.2 rest-client|hum|0.25.1 better-cpp-syntax|jef|1.15.19 cmake-language-support-vscode|jos|0.0.4 Lua|key|0.0.9 mypy|mat|0.2.2 asm-code-lens|maz|1.10.2 git-graph|mhu|1.30.0 vscode-docker|ms-|1.22.1 vscode-dotnet-runtime|ms-|1.5.0 python|ms-|2022.14.0 vscode-pylance|ms-|2022.9.40 jupyter|ms-|2022.8.1002431955 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.9 remote-containers|ms-|0.251.0 remote-ssh|ms-|0.84.0 remote-ssh-edit|ms-|0.82.0 remote-wsl|ms-|0.66.3 vscode-remote-extensionpack|ms-|0.21.0 cmake-tools|ms-|1.12.27 cpptools|ms-|1.13.1 cpptools-extension-pack|ms-|1.3.0 hexeditor|ms-|1.9.8 vetur|oct|0.36.0 ruby|reb|0.28.1 java|red|1.10.0 vscode-yaml|red|1.10.1 LiveServer|rit|5.7.9 wow-bundle|Sep|1.3.0 code-spell-checker|str|2.8.0 lua|sum|3.5.6 svelte-vscode|sve|106.1.1 pdf|tom|1.2.0 vscode-lua|tri|0.12.4 simple-rst|tro|1.5.2 cmake|twx|0.0.17 python-member-declare|und|0.0.1 intellicode-api-usage-examples|Vis|0.2.3 vscodeintellicode|Vis|1.2.28 vscode-java-debug|vsc|0.44.0 vscode-java-dependency|vsc|0.21.0 vscode-java-pack|vsc|0.25.2 vscode-java-test|vsc|0.37.1 vscode-maven|vsc|0.39.0 vscode-ruby|win|0.28.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30557514 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 2144e591:30553903 40g7c324:30573242 ```
gjsjohnmurray commented 2 years ago

Probably #113175