Skip to content

[EventPopover] Update Popover.Positioner to use fixed positioning method - #20789

Closed
sai6855 wants to merge 4 commits into
mui:masterfrom
sai6855:schduler-popver
Closed

[EventPopover] Update Popover.Positioner to use fixed positioning method#20789
sai6855 wants to merge 4 commits into
mui:masterfrom
sai6855:schduler-popver

Conversation

@sai6855

@sai6855 sai6855 commented Dec 31, 2025

Copy link
Copy Markdown
Member

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

@mui-bot

mui-bot commented Dec 31, 2025

Copy link
Copy Markdown

Deploy preview: https://deploy-preview-20789--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against a5b40f3

@sai6855 sai6855 added type: bug It doesn't behave as expected. scope: scheduler Changes related to the scheduler. labels Dec 31, 2025
@sai6855
sai6855 marked this pull request as ready for review December 31, 2025 08:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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"

Copilot AI Dec 31, 2025

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@flaviendelangle

Copy link
Copy Markdown
Member

Hi,

I don't think it's worth contributing on the Scheduler for now since it's not even in alpha 👍

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jan 8, 2026
@github-actions

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@sai6855 sai6855 closed this Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: out-of-date The pull request has merge conflicts and can't be merged. scope: scheduler Changes related to the scheduler. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants