mui / mui/base-ui

[popover] Positioner cannot track a moving virtual anchor

Open
#4,534 2 comments 0 reactions 0 assignees View on GitHub
component: popover
Dominant language
TypeScript
Stars
10.9k
Forks
543
Avg merge
1d 20h
Merged PRs (30d)
101

Description

When the anchor is a virtual element that can move - e.g. a map marker that "moves" as a map is panned - the positioner doesn't reposition when the virtual anchor's `getBoundingClientRect()` changes

https://github.com/user-attachments/assets/0c0be37c-0f29-4eed-bc9a-53ea6a835c81

Repro: https://stackblitz.com/edit/y3eogukn?file=src%2FApp.tsx

A workaround is somewhat possible but requires fighting the positioner's styles (it's a required part) and loses a bunch of Floating UI features

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.