Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrollbar for File menu is displaying over Open Recent #236998

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

g122622
Copy link

@g122622 g122622 commented Dec 27, 2024

fix #174350

This PR fixes Issue #236982 : Scrollbar for File menu is displaying over Open Recent

Overview

This is not just an issue with the "Open Recent" menu; in fact, it's a common problem for all submenus that have a vertical scrollbar. It is caused by the submenu having too low of a z-index value.

Changes

  • The special zIndex = '1' specification for the submenu wrapper element (div.monaco-submenu) has been removed from the src\vs\base\browser\ui\menu\menu.ts file, leaving its z-index still subject to the z-index of 2000 defined in menubar.css.

Modified Files

  • src\vs\base\browser\ui\menu\menu.ts

Testing

I have used my own project to test out this feature

Before this fix:

image

After this fix:

image

@g122622 g122622 changed the title Update menu.ts Fix Issue #236982 : Scrollbar for File menu is displaying over Open Recent Dec 27, 2024
@bpasero
Copy link
Member

bpasero commented Dec 28, 2024

@g122622 that specific zIndex was added for #103170, are you sure that issue is still resolved after your change?

@g122622
Copy link
Author

g122622 commented Dec 28, 2024

@bpasero Now I have made further modifications to menu.ts, moving the zIndex=1 to Shadow DOM CSS. As a result, both of these issues are now resolved.

Issue #236982 :
image

Issue #103170 :
image

@bpasero bpasero requested a review from benibenj January 6, 2025 14:45
@bpasero bpasero self-assigned this Jan 6, 2025
@bpasero bpasero added this to the January 2025 milestone Jan 6, 2025
@bpasero
Copy link
Member

bpasero commented Jan 6, 2025

Thanks, this indeed seems to address the original issue as well as to fix #174350.

I am asking @benibenj for a second look but otherwise I am OK to merge this in. Thanks!

@bpasero bpasero changed the title Fix Issue #236982 : Scrollbar for File menu is displaying over Open Recent Scrollbar for File menu is displaying over Open Recent Jan 6, 2025
@bpasero bpasero enabled auto-merge (squash) January 7, 2025 14:48
@bpasero bpasero closed this Jan 7, 2025
auto-merge was automatically disabled January 7, 2025 14:48

Pull request was closed

@bpasero bpasero reopened this Jan 7, 2025
@bpasero bpasero enabled auto-merge (squash) January 7, 2025 14:48
@bpasero bpasero closed this Jan 7, 2025
auto-merge was automatically disabled January 7, 2025 15:56

Pull request was closed

@bpasero bpasero reopened this Jan 7, 2025
@bpasero bpasero enabled auto-merge (squash) January 7, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Menu scrollbar overlaps with submenu
6 participants