Skip to content

Alt+Click on a toolbar button causes the Menu Bar to toggle on KeyUp #44396

Closed

Description

@eamodio

Issue Type: Bug

  1. Set the Menu Bar to be hidden
  2. Alt+Click on one of the editor/title toolbar buttons (for example in GitLens if you Alt+Click on the Blame button it will show the recent changes rather than the blame)
  3. 🐛 Observe that when you let go of the alt key the menu bar will toggle back on

FYI, I have a PR ready to submit for this

VS Code version: Code - Insiders 1.21.0-insider (9031699, 2018-02-26T05:18:08.801Z)
OS version: Windows_NT x64 10.0.17107

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 x 4008)
Memory (System) 31.93GB (17.59GB free)
Process Argv C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe C:\Users\Eric\code\microsoft\vscode
Screen Reader no
VM 0%
Reproduces without extensions

Activity

  1. added
    layout
    on Feb 26, 2018
  2. isidorn commented on Feb 26, 2018

    @isidorn

    Eric Amodio (@eamodio) thanks for your PR, however let's first get the bug straigthend out.

    1. Open explorer.
    2. Hold alt key, trigger context menu -> notice there is "Delete Permanently"
    3. Let go of the all key -> notice there is "Delete Permanently" still there. I just verified on windows.

    Is this unexpected for you? Becuase it behaves just fine for me.
    Or is the issue only visible for extensions?
    Is step 1. really needed to repro? If yes how do you hide the Menu Bar

    fyi Johannes Rieken (@jrieken)

  3. added
    info-needed
    and removed
    layout
    on Feb 26, 2018
  4. eamodio commented on Feb 26, 2018

    @eamodio
    ContributorAuthor

    Isidor Nikolic (@isidorn)
    I can repro my issue on Windows/Linux - but the Menu Bar must be hidden (View -> Toggle Menu Bar).

    Hold down Alt and click on any of these icons (granted only the GitLens one actually has an alternate command)
    image

    When you let go of the Alt key it will cause the Menu Bar to be shown.

    As for your issue, I can't even get a context menu to show up while holding down Alt -- well it shows for a second and disappears. And that doesn't matter if the menu bar is hidden or not.

  5. isidorn commented on Feb 27, 2018

    @isidorn

    This seems to be an issue with the alt key on windows and this feels like a duplicate of #44136

  6. eamodio commented on Feb 27, 2018

    @eamodio
    ContributorAuthor

    Isidor Nikolic (@isidorn) the issue you mentioned, yes -- that is a duplicate of #44136, but the issue I mentioned is not. There is no issue with the alt key not working. It it just that if you hide the menu bar (on Windows/Linux) you can use the alt key alone to toggle it on and off. Which is perfectly fine and as-designed. But if you attempt to alt+click on an item in a "toolbar" (see the image in my previous post), the alt leaks through that click (the command works fine, mind you) so that not only does the command run, but the menu bar toggles (and it drives me NUTS 😄).

    There was similar work done to stop this from happening when alt+clicking in the editor here:
    https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/codeEditor/electron-browser/menuPreventer.ts

  7. isidorn commented on Feb 28, 2018

    @isidorn

    Ok thanks for more info. Johannes Rieken (@jrieken) fyi

  8. vscodebot commented on Mar 7, 2018

    @vscodebot

    This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

    Happy Coding!

  9. removed
    info-needed
    on Mar 7, 2018
  10. added a commit that references this issue on May 5, 2018
    d22bb5c
  11. added a commit that references this issue on May 9, 2018
    6f56ff3
  12. added
    bug
    on May 9, 2018
  13. locked and limited conversation to collaborators on Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions