-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Popover: Prevent the Popover from going outside the browser window in some situations #8815
base: dev
Are you sure you want to change the base?
Popover: Prevent the Popover from going outside the browser window in some situations #8815
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8815 +/- ##
==========================================
+ Coverage 89.82% 90.49% +0.66%
==========================================
Files 412 419 +7
Lines 11878 12189 +311
Branches 2364 2380 +16
==========================================
+ Hits 10670 11030 +360
+ Misses 681 627 -54
- Partials 527 532 +5 ☔ View full report in Codecov by Sentry. |
Strangely the notification popover still seems to get clipped (#7032 (comment)) Shrink the window until it changes layout, click the hamburger menu, then click the notifications icon to see |
Do you mean that the popover still goes outside the window after my changes? because I can't reproduce that. But my notification area looks wrong, maybe that is the reason |
What do you think about this by the way #1167 (comment)? I want to get the tooltip layout fixed but something needs to be adjusted in the javascript (try settings |
Hi
@Saman-00 can you fix that? Then we can merge if there no other issues. |
@Saman-00 Would it make sense if
Me and @Garderoben talked about scroll locking before and the current behavior where you can freely scroll was preferred. MUI does lock it on the other hand. |
Maybe we should not even try to fix it, if it's too much work.
|
Description
popover-content
is positioned based on the parent element of theMudPopover
component, and when this parent element is outside the browser window, the popup also goes outside the window and is partially visible or not visible at all, this seems to be a common occurrence inMudDataGrid
's simple filter popover when the grid has a scroll.This behavior can be viewed here: https://try.mudblazor.com/snippet/cOGeEScJpoYZVWLx
This commit attempts to fix the issue by preventing the popover from going outside the window.
It potentially fixes these issues: Fixes #8180, fixes #8173, fixes #7032, fixes #7707
This video shows how it currently is: https://github.com/MudBlazor/MudBlazor/assets/5804803/803e4884-a5b0-4452-ae4c-afe2552c3ed8
This one shows how it will behave after the change: https://github.com/MudBlazor/MudBlazor/assets/5804803/5f30914b-9bd0-4680-a603-246639298a47
How Has This Been Tested?
This change has been tested visually, I made a component out of the TryMudBlazor snippet and tested manually.
Type of Changes
Checklist
dev
).