microsoft / vscode

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

Webview repeats some keyboard shortcut execution #109702

Closed rebornix closed 3 years ago

rebornix commented 3 years ago

Issue Type: Bug

toggle-terminal

I'm not seeing this issue in Stable so it's a regression.

VS Code version: Code - Insiders 1.51.0-insider (2ee8b8c645ec8ab54304bacae7aa979c1d9c647a, 2020-10-29T06:00:13.428Z) OS version: Darwin x64 19.6.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|32.00GB (1.08GB free)| |Process Argv|--enable-proposed-api ms-vscode.vscode-notebook-history --enable-proposed-api vscode.notebook-editing --crash-reporter-id 1a907bbd-fa02-4595-81e0-63e1648afb31| |Screen Reader|no| |VM|0%|
Extensions (41) Extension|Author (truncated)|Version ---|---|--- comment-tagged-templates|bie|0.3.0 github-markdown-preview|bie|0.0.2 markdown-emoji|bie|0.0.9 markdown-preview-github-styles|bie|0.1.6 gitlens|eam|10.2.2 tsl-problem-matcher|eam|0.3.1 vscode-pull-request-github-insiders|Git|2020.10.41223 vscode-fluent-icons|mig|0.0.1 theme-monokai-pro-vscode|mon|1.1.17 vscode-docker|ms-|1.7.0 vscode-language-pack-zh-hans|MS-|1.51.1 dotnet-interactive-vscode|ms-|1.0.152203 vscode-dotnet-runtime|ms-|0.1.2 python|ms-|2020.10.332292344 remote-containers|ms-|0.147.0 remote-ssh-edit-nightly|ms-|2020.10.29700 remote-ssh-nightly|ms-|2020.10.29700 hexeditor|ms-|1.3.0 js-debug-nightly|ms-|2020.10.2817 powershell-preview|ms-|2020.9.0 vscode-github-issue-notebooks|ms-|0.0.57 vscode-markdown-notebook|ms-|0.0.13 vscode-notebook-history|ms-|0.0.1 vsliveshare|ms-|1.1.0-dev vsonline|ms-|1.0.3073 debugger-for-chrome|msj|4.12.11 toggle|reb|0.0.1 java|red|0.69.0 kuskus-extensions-pack|ros|1.0.1 kuskus-kusto-language-server|ros|1.0.1 kuskus-kusto-syntax-highlighting|ros|1.1.8 rust|rus|0.7.8 sourcekit-lsp|unp|0.0.1 vscode-lldb|vad|1.6.0 vscodeintellicode|Vis|1.2.10 vscode-java-debug|vsc|0.29.0 vscode-java-dependency|vsc|0.14.0 vscode-java-pack|vsc|0.10.0 vscode-java-test|vsc|0.25.0 vscode-maven|vsc|0.25.0 notebook-editing|vsc|1.0.0 (5 theme extensions excluded)
rebornix commented 3 years ago

Assign it to October milestone as it's a regression.

mjbvz commented 3 years ago

Doesn't happen for me on MacOS. Do you have any settings related to webviews, such as using iframe based webviews?

rebornix commented 3 years ago

@mjbvz right I do have a legacy useIframe setting for webview. After removing that the issue is gone.

mjbvz commented 3 years ago

Thanks. I will take a look but am unassigning this for October then since that setting is still experimental

rebornix commented 3 years ago

I found something more interesting:

This happens even without the experiment settings. I also toggled the keyboard shortcut troubleshooting and when ctrl+` went dead, the keybinding service doesn't get any keyboard events as well.

rebornix commented 3 years ago

@mjbvz can you try if you can reproduce with steps listed in https://github.com/microsoft/vscode/issues/109702#issuecomment-719062237 ?

mjbvz commented 3 years ago

Fixed by ffb8c08

@rebornix I can reproduce the second issue too and have extracted it to #110276

mjbvz commented 3 years ago

To verify:

  1. On MacOS
  2. Set "webview.experimental.useIframes": true
  3. Restart VS code
  4. Open a markdown preview
  5. Now try running some toggle commands such as ctrl + backtick while focused on the webview