Skip to content

[OverlayController] _handleZIndex never executes - 'setup' phase is unused #2608

@hyakt

Description

@hyakt

Expected behavior

The _handleZIndex method should set z-index to '1' for local overlays during initialization when the content node doesn't have an explicit z-index.
This ensures local overlays appear on top of elements with no z-index that appear later in the DOM.

Actual Behavior

The z-index logic never executes because _handleZIndex checks for phase === 'setup', but this phase is never used anywhere in the codebase.

Code reference:

_handleZIndex({ phase }) {
if (this.placementMode !== 'local') {
return;
}
if (phase === 'setup') {
const zIndexNumber = Number(getComputedStyle(this.contentNode).zIndex);
if (zIndexNumber < 1 || Number.isNaN(zIndexNumber)) {
this.contentNode.style.zIndex = '1';
}
}
}

Suggested fix:
From if (phase === 'setup') to if (phase === 'init')

Additional context

This affects local overlays like tooltips when they don't have explicit z-index values set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions