Skip to content

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

Merged
marchbox merged 12 commits into
microsoft:masterfrom
marchbox:users/machi/fix-dropdown-position-in-dialog
Jun 5, 2026
Merged

fix(web-components): make anchor position targets fixed positioned#36258
marchbox merged 12 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

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown

📊 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.

@davatron5000 davatron5000 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.

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

@marchbox marchbox marked this pull request as ready for review June 4, 2026 21:09
@marchbox marchbox requested a review from a team as a code owner June 4, 2026 21:09
@marchbox

marchbox commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Update: the Safari bug is related to using position-area, changing to inset-* fixes it.

@marchbox marchbox requested a review from davatron5000 June 4, 2026 21:16
@marchbox marchbox merged commit c0ef6cf into microsoft:master Jun 5, 2026
13 checks passed
@marchbox marchbox deleted the users/machi/fix-dropdown-position-in-dialog branch June 5, 2026 18:34
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