Skip to content

frame WebViewes eat keyboard input #104329

Closed

Description

Issue Type: Bug

  1. open Release Notes
  2. press alt to open the file menu

what's happening.

menu dosn't opens.

what should happen.

menu opens, focus moves

VS Code version: Code - Insiders 1.48.0-insider (2277c8e, 2020-08-07T11:32:09.993Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4200)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.86GB (7.90GB free)
Process Argv
Screen Reader yes
VM 25%
Extensions (22)
Extension Author (truncated) Version
github-markdown-preview bie 0.0.2
markdown-checkbox bie 0.1.3
markdown-emoji bie 0.0.9
markdown-preview-github-styles bie 0.1.6
markdown-yaml-preamble bie 0.0.4
vscode-astyle chi 0.9.0
vscode-markdownlint Dav 0.36.2
githistory don 0.6.9
EditorConfig Edi 0.15.1
vscode-pull-request-github Git 0.18.1
vscode-language-pack-ru MS- 1.48.2
python ms- 2020.7.96456
remote-ssh ms- 0.51.0
remote-ssh-edit ms- 0.51.0
remote-wsl ms- 0.44.4
cmake-tools ms- 1.4.1
cpptools ms- 0.29.0
vsliveshare ms- 1.0.2478
vsliveshare-audio ms- 0.1.85
vsliveshare-pack ms- 0.4.0
code-spell-checker str 1.9.0
code-spell-checker-russian str 0.2.4

Activity

  1. changed the title [-]frame WebViewes eat keybord input[/-] [+]frame WebViewes eat keyboard input[/+] on Aug 9, 2020
  2. added
    accessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issues
    regressionSomething that used to work is now broken
    on Aug 10, 2020
  3. isidorn commented on Aug 10, 2020

    @isidorn

    I can reproduce this - just open any markdown preview and alt+f will not open the file menu.
    I think we should fix this for this release, as it is a breaking change (in last stable I can nicely press alt+f to open the file menu). Due to that I am assigning this to July and Matt Bierner (@mjbvz) can move it out if he would prefer to fix it next milestone

    Also fyi SteVen Batten (@sbatten) for custom menus

  4. mjbvz commented on Aug 10, 2020

    @mjbvz
    Contributor

    SteVen Batten (@sbatten) Has the way the menus handle mnemonics changed this iteration? The webview still seem to be dispatching the events but they aren't being handled by anyone

  5. sbatten commented on Aug 10, 2020

    @sbatten
    Member

    Matt Bierner (@mjbvz) nope no changes that i know of

  6. sbatten commented on Aug 10, 2020

    @sbatten
    Member

    should be handled here

    this._subscriptions.add(domEvent(document.body, 'keydown', true)(e => {

  7. mjbvz commented on Aug 10, 2020

    @mjbvz
    Contributor

    alt+f is working for me and SteVen Batten (@sbatten) in insiders on windows.

    For just pressing alt to show the mnemonics, this does not seem like a regression from 1.47 in my testing but it was working in 1.46

  8. 9 remaining items

  9. added a commit that references this issue on Feb 17, 2021
    2a0d839
  10. added a commit that references this issue on Feb 19, 2021
    094777f
  11. added
    unreleasedPatch has not yet been released in VS Code Insiders
    insiders-releasedPatch has been released in VS Code Insiders
    and removed
    unreleasedPatch has not yet been released in VS Code Insiders
    on Feb 19, 2021
  12. DanTup commented on Mar 8, 2021

    @DanTup
    Contributor

    Matt Bierner (@mjbvz) is there something webviews need to do to have keys passed back to VS Code? This came up at flutter/devtools#2775 and I can repro in both stable and insiders. The webview hosts an iframe if that matters. I'm unable to interact with VS Code (eg. to open command palette) when focus is in the web view.

    I tried loading a non-Flutter page in there to check it wasn't specific to Flutter, but it's happening with other pages too.

  13. mjbvz commented on Mar 8, 2021

    @mjbvz
    Contributor

    If you can avoid it, don't use an iframe.

    If you absolutely must use an iframe, then you need to dispatch the keypresses back to webviews. See #65452 (comment)

  14. DanTup commented on Mar 9, 2021

    @DanTup
    Contributor

    Matt Bierner (@mjbvz) I don't think there's any way to avoid the iframe really. The linked solution didn't work due to CORS issues, but the comments further down using postMessage to bounce the events over does. I'll see whether we can get something like that in the embedded app. Thanks!

  15. locked and limited conversation to collaborators on Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

accessibilityKeyboard, mouse, ARIA, vision, screen readers (non-specific) issuesbugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersregressionSomething that used to work is now brokenverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions