microsoft / vscode

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

Hidden Menu Bar Appears After Fast Scrolling #170314

Open Eshnek opened 1 year ago

Eshnek commented 1 year ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Hide the menu bar on top (View > Appearance > Menu Bar)
  2. Use fast scroll
  3. The menu bar appears when you let go of fast scroll

Proposed solutions:

  1. I don't see any way to adjust the fast-scroll keybinding - this would work as a fix.
  2. Alternatively, it could be made possible to rebind the menu bar hotkey to something else.
  3. The ideal fix is to not show the menu bar if the user scrolled while the alt key was held.
sbatten commented 1 year ago

@Eshnek can you verify what your "window.titlebarstyle" setting is?

Eshnek commented 1 year ago

@sbatten It is "window.titleBarStyle": "native"

Interestingly though, using custom instead of native fixes the editor sizes changing because the menu bar is displayed as part of the title bar in that mode.

This makes the issue less noticeable, however the title bar is still made visible at the end of the fast-scroll process.

I would still prefer to be able to use the native title bar, though...

sbatten commented 1 year ago

@Eshnek agree that the native should work. Can you share a screen recording of the issue reproducing? Moving to @deepak1556 as native titlebar and menubar are controlled by Electron.

Eshnek commented 1 year ago

https://user-images.githubusercontent.com/89618355/210149483-1fee6c3d-0c08-4bff-a27e-1db02c2b99f7.mp4

deepak1556 commented 1 year ago

I don't have the hardware to verify the fast scroll scenario, /cc @rzhao271

Core of the menu bar focus is performed in https://github.com/electron/electron/blob/644243efd61b75c22707605d9d0dbc6ade4fe458/shell/browser/ui/views/menu_bar.cc#L133-L157. Not sure if this can be addressed since the Alt key callback comes from the chromium focus manager.

PoignardAzur commented 1 year ago

Can confirm, I've had the same problem ever since I installed vscode, I just got around to filing an issue.

At some point I looked into fixing it and came to the same conclusion (that it needed electron-specific handling).