fix(core): FloatingPopover escapes a transformed ancestor's containing block; native Select mode - #518
Open
dvcolomban wants to merge 1 commit into
Open
Conversation
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-oxc
@vitejs/devtools-rolldown
@vitejs/devtools-vite
@vitejs/devtools-vitest
commit: |
dvcolomban
marked this pull request as draft
August 5, 2026 21:42
…ect mode - `FloatingPopover` teleports its panel out of the outermost ancestor that forms a containing block for `position: fixed`, so the panel is neither positioned relative to it nor clipped by its `overflow`. With no such ancestor it renders in place, unchanged. The target stays inside the shadow root, which is where the panel's styling comes from. - New `surface` prop on `FloatingPopover`: `menu` drops the tooltip padding and uses `bg-glass:25` with a slightly stronger border, for a panel that stacks over an already-tinted surface where tooltip glass composites to near-black. - `Select` gains `native`, rendering a real `<select>` whose option list the browser draws outside the page's layout. Trades away `icon`, `description` and `searchable`. - `Select`'s dropdown adopts the `menu` surface, `gap: 4`, `primary` for the selected option and `surfaceBadge` for the active row.
dvcolomban
force-pushed
the
fix/json-render-select-popover-escape
branch
from
August 5, 2026 23:18
59b5a4c to
e6153ad
Compare
dvcolomban
marked this pull request as ready for review
August 5, 2026 23:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
FloatingPopoverresolves the outermost ancestor that forms a containing block forposition: fixeddescendants and<Teleport>s its panel into that ancestor's parent. With no such ancestor, it renders in place as before.surfaceprop onFloatingPopover,tooltip(default) ormenu.menurendersp0 bg-glass:25 border-#8883in place ofpx2 p1 bg-glass:80 border-base.Selectgainsnative, rendering a real<select>instead of the custom listbox. It has noicon,descriptionorsearchablesupport.Select's dropdown now usessurface="menu"andgap: 4, colours the selected option withprimaryand the active row withsurfaceBadge, and no longer passes!p0inpanelClass.webcomponentsAPI snapshot updated forSelectProps.native.Why it changed
A
position: fixedpanel is positioned relative to its nearest ancestor carrying a non-nonetransformorfilter, not the viewport, and is clipped by that ancestor'soverflow. Rendered inside such a panel, theSelectdropdown was offset from its trigger and cut off — unusable. Escaping the outermost rather than the nearest such ancestor matters because escaping one can land inside another. The teleport target stays inside the shadow root, since that is where the panel's stylesheet is adopted anddocument.bodywould strip its styling.The
menusurface exists because a floating panel stacks over an already-tinted surface, where tooltip-strength glass composites to near-black, and because tooltip padding is wrong for a listbox — it inset the options and made the panel wider than its trigger.nativeis an escape hatch worth having regardless of the fix above: the browser draws a native option list outside the page's layout, so no ancestor can clip or misposition it at all, which is the dependable choice for aSelectembedded in a host layout this component doesn't control. Its option list needs no styling here, asColorSchemeRootalready setscolor-schemeinline and that inherits.