Skip to content

fix: hoist floating overlays into shell so they share a stacking cont…#1203

Merged
mathuo merged 1 commit intomasterfrom
fix/floating-overlay-stacking-context
Apr 28, 2026
Merged

fix: hoist floating overlays into shell so they share a stacking cont…#1203
mathuo merged 1 commit intomasterfrom
fix/floating-overlay-stacking-context

Conversation

@mathuo
Copy link
Copy Markdown
Owner

@mathuo mathuo commented Apr 27, 2026

…ext with render overlays

.dv-dockview has contain: layout, which forms a stacking context. That trapped floating overlay z-indexes inside .dv-dockview and prevented them from stacking against the OverlayRenderContainer's .dv-render-overlay panels (which live at the shell level). The visible symptom was that a floating panel using renderer: 'always' would always appear above other floating panels regardless of which group was active — the AriaLevelTracker ordering was correct, but the two layers were resolving in different stacking contexts.

Add a .dv-floating-overlay-host element in the shell, sized to mirror the gridview rect on each layout. Floating overlays now live inside this host alongside the render overlays, so all overlay z-indexes resolve in the same shell-level stacking context and the AriaLevelTracker is the single source of truth for layering.

Description

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / cleanup
  • Build / CI / tooling

Affected packages

  • dockview-core
  • dockview (vanilla JS)
  • dockview-react
  • dockview-vue
  • dockview-angular
  • docs

How to test

Checklist

  • yarn lint:fix passes
  • yarn format passes
  • npm run gen has been run and generated files are up to date
  • yarn test passes
  • I have added or updated tests where applicable
  • Breaking changes are documented

…ext with render overlays

`.dv-dockview` has `contain: layout`, which forms a stacking context.
That trapped floating overlay z-indexes inside `.dv-dockview` and
prevented them from stacking against the OverlayRenderContainer's
`.dv-render-overlay` panels (which live at the shell level). The
visible symptom was that a floating panel using `renderer: 'always'`
would always appear above other floating panels regardless of which
group was active — the `AriaLevelTracker` ordering was correct, but
the two layers were resolving in different stacking contexts.

Add a `.dv-floating-overlay-host` element in the shell, sized to
mirror the gridview rect on each layout. Floating overlays now live
inside this host alongside the render overlays, so all overlay
z-indexes resolve in the same shell-level stacking context and the
`AriaLevelTracker` is the single source of truth for layering.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@mathuo mathuo merged commit 1735951 into master Apr 28, 2026
9 checks passed
pull Bot pushed a commit to bryanwills/dockview that referenced this pull request Apr 28, 2026
The `.dv-floating-overlay-host` introduced in mathuo#1203 has
`pointer-events: none` so it doesn't block clicks on the gridview
underneath, but nothing re-enabled pointer events on the floating
overlay inside it — so clicks and drags on a floating group passed
straight through and the group became uninteractable.

Set `pointer-events: auto` on `.dv-floating-overlay-host > .dv-resize-container`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pull Bot pushed a commit to bryanwills/dockview that referenced this pull request Apr 28, 2026
After mathuo#1203 floating overlays live in the shell as siblings of the
popover anchor, sharing one stacking context. AriaLevelTracker writes
their inline z-index as `calc(999 + i*2)`; for a single floating group
that equals the popover's `var(--dv-overlay-z-index)` (999), so the
later-in-DOM `dv-floating-overlay-host` paints over the menu and
right-clicking a tab inside a floating group appeared to do nothing.

Mirror the lookup that `tabsContainer` already does for its overflow
popover: walk up from `event.target` via `findRelativeZIndexParent`
and pass `calc(<that> * 2)` so the menu always sits above the
overlay it was opened from. Apply to both `show()` (tab menu) and
`showForChip()` (chip menu).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant