Skip to content

Cap submenu maxHeight to 50vh to prevent weird autoscroll #495

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

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

Amnish04
Copy link
Collaborator

@Amnish04 Amnish04 commented Mar 13, 2024

This has been an issue for a long time. When we have a lot of items in a submenu, we get a weird autoscroll that tried to focus the first element of the list (which was not able to fit in the available viewport height).

I tried to fix this in #487, but it had a subtle mistake where I set maxHeight to 50vw instead of 50vh due to which the bug wasn't fixed properly.

I have corrected that mistake and the results are much better now.
image

This fixes #454

@Amnish04 Amnish04 requested a review from WangGithub0 March 13, 2024 16:46
@Amnish04 Amnish04 self-assigned this Mar 13, 2024
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: fe885fe
Status: ✅  Deploy successful!
Preview URL: https://2a0bcdd7.console-overthinker-dev.pages.dev
Branch Preview URL: https://amnish04-issue-452.console-overthinker-dev.pages.dev

View logs

Copy link
Collaborator

@WangGithub0 WangGithub0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Amnish04 Amnish04 merged commit b123ee6 into main Mar 13, 2024
4 checks passed
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.

AutoScroll in Firefox with Long Submenus
2 participants