You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`FloatingPopover` (hub-ui) is positioned `fixed` against its anchor's viewport rect, but a
`transform`/`filter`/`contain` ancestor makes itself the containing block for that
`position: fixed`, so the panel ends up positioned relative to — and clipped by — that
ancestor instead of the viewport. `resolveFixedEscapeTarget` walks up from the anchor to the
outermost such ancestor (escaping only the nearest one can land inside another) and
`<Teleport>`s the panel to its parent; walking `parentElement` stops at a shadow root's
boundary, so a dock's popover never escapes the shadow root its stylesheet is scoped to. With
no such ancestor, the panel renders in place as before.
`Select` (json-render-ui) gains `native`, rendering a real `<select>` instead of
`FormSelect`/`FormCombobox`: the browser draws its option list outside the page's layout, so
no ancestor can clip or reposition it at all — a dependable escape hatch for a `Select`
embedded in a host layout this component doesn't control, at the cost of `icon`,
`description` and `searchable`, which have no native equivalent.
Ports vitejs/devtools#518, adapted to this fork: that PR's `surface` prop and `Select`'s
switch to it don't have an equivalent here — this fork's `Select` renders through
@antfu/design's `FormSelect`/`FormCombobox` (reka-ui popovers), not through
`FloatingPopover`, so there's no consumer to point at a menu surface. (Those reka-ui
popovers default to portalling into `document.body`, which suffers the same class of bug
inside a shadow root or a transformed ancestor — worth a follow-up, but out of scope for a
first-party fix here.)
Closes#205
Co-authored-by: dvcolomban <dinh-van.colomban@contentsquare.com>
0 commit comments