Skip to content

fix(web-components): make anchor position targets fixed positioned#36258

Draft
marchbox wants to merge 4 commits into
microsoft:masterfrom
marchbox:users/machi/fix-dropdown-position-in-dialog
Draft

fix(web-components): make anchor position targets fixed positioned#36258
marchbox wants to merge 4 commits into
microsoft:masterfrom
marchbox:users/machi/fix-dropdown-position-in-dialog

Conversation

@marchbox
Copy link
Copy Markdown
Contributor

Previous Behavior

All anchor position target elements in different components have absolute position, this causes issues when the anchor element is inside a fixed positioned element, e.g. a <dialog>, as if the page scrolls, the target will scroll with the page while the anchor stay fixed due to its fixed positioned container.

New Behavior

All target elements are fixed positioned.

Related Issue(s)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

📊 Bundle size report

✅ No changes found

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@MarvinKlein1508
Copy link
Copy Markdown

@marchbox there is still an issue with the dropdown on mobile. It's impossible to select the fifth option here. image

@marchbox
Copy link
Copy Markdown
Contributor Author

@marchbox there is still an issue with the dropdown on mobile. It's impossible to select the fifth option here.

@MarvinKlein1508 Nice catch. I’d expect the fallback position to kick in here, I’ll investigate. Thanks!

@marchbox
Copy link
Copy Markdown
Contributor Author

@marchbox there is still an issue with the dropdown on mobile. It's impossible to select the fifth option here.

@MarvinKlein1508 Nice catch. I’d expect the fallback position to kick in here, I’ll investigate. Thanks!

Update: this seems to be a Safari only bug, as the fallback works in Chrome and Firefox. Will see how to mitigate it.

Copy link
Copy Markdown
Contributor

@davatron5000 davatron5000 left a comment

Choose a reason for hiding this comment

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

Good with the change to fixed but will re-review when we feel like we fixed the Mobile Safari bug.

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.

[Bug]: Dropdown position is wrong when it is being used in dialogs in Firefox

3 participants