[EventPopover] Update Popover.Positioner to use fixed positioning method - #20789
[EventPopover] Update Popover.Positioner to use fixed positioning method#20789sai6855 wants to merge 4 commits into
Conversation
|
Deploy preview: https://deploy-preview-20789--material-ui-x.netlify.app/ Bundle size report
|
…to schduler-popver
There was a problem hiding this comment.
Pull request overview
This PR fixes a popover positioning bug where clicking on a scheduler cell would open the EventPopover at the wrong position when the page was scrolled. The issue occurred because the popover was using absolute positioning relative to the DayTimeGridContainer, causing misalignment when the container scrolled out of view.
Key Changes:
- Changed EventPopover positioning from absolute (default) to fixed positioning by adding
positionMethod="fixed"prop
| sideOffset={8} | ||
| anchor={anchor} | ||
| disableAnchorTracking | ||
| positionMethod="fixed" |
There was a problem hiding this comment.
The popover positioning behavior with scrolling should be tested to ensure the fix works correctly and prevent regressions. Consider adding a test that verifies the popover appears at the correct position when the page is scrolled.
|
Hi, I don't think it's worth contributing on the Scheduler for now since it's not even in alpha 👍 |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Clicking on a cell was opening the popover at the wrong position when isSidePanelOpen was set to false. You'd have to scroll up to actually see it.
The issue was that the popover was using position: absolute, so it positioned itself relative to the DayTimeGridContainer. When the page is scrolled, the container moves off-screen but the popover coordinates stay the same — ending up in the wrong spot visually.
Switched to positionMethod="fixed" so the popover positions relative to the viewport instead. Now it shows up next to the clicked cell no matter where you've scrolled.
Before (Watch it from 10 sec mark)
Recording.2025-12-31.141631.mp4
After
Recording.2025-12-31.141132.mp4