-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MudPopover: Fix MudList Scroll Issue #11694
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
Conversation
This change ensures that the `firstChild` element of the popover respects the same maximum height constraint as the popover content by setting its `maxHeight` to `newMaxHeight` instead of inherit which causes a redraw every time the mouse exits the popover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in MudMenu where shortened lists caused unnecessary redraws when the mouse exits the popover. The fix ensures that the first child element of the popover respects the same maximum height constraint as the popover content, preventing visual jumping where scrolled items would snap back to the top.
- Sets explicit
maxHeight
on the first child element instead of relying on inheritance - Eliminates redraw issues that occurred when mouse interactions triggered popover updates
- Improves user experience with nested menu navigation
|
This change ensures that the
firstChild
element of the popover respects the same maximum height constraint as the popover content by setting itsmaxHeight
tonewMaxHeight
instead of inherit which causes a redraw every time the mouse exits the popover.Resolves #11667 by adjusting the max-height at the mud-list level instead of letting it inherit. When it inherits it causes a redraw which puts the top scrolled item back to the top.
You can test in PopoverFlipDirectionTest.razor with/without this change. The attached issue happens quicker and easier to reproduce since Nested Lists are separate popovers (Causing an immediate redraw every time your mouse activates a nested menu item.
Checklist:
dev
).