Skip to content

fix(Dialog): add z-index to non-modal dialogs - #5123

Merged
eirikbacker merged 4 commits into
mainfrom
fix/dialog-non-modal-z-index
Jul 30, 2026
Merged

fix(Dialog): add z-index to non-modal dialogs#5123
eirikbacker merged 4 commits into
mainfrom
fix/dialog-non-modal-z-index

Conversation

@eirikbacker

Copy link
Copy Markdown
Contributor

Resolves #4208

@eirikbacker eirikbacker self-assigned this Jul 30, 2026
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0f25702

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@digdir/designsystemet-css Patch
@digdir/designsystemet Patch
@digdir/designsystemet-types Patch
@digdir/designsystemet-react Patch
@digdir/designsystemet-web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the CSS for Dialog to ensure non-modal dialogs render above other UI elements (e.g., Search icons) by giving the dialog a default stacking order, addressing issue #4208.

Changes:

  • Adds a z-index to .ds-dialog to avoid overlap issues when a non-modal dialog is displayed over other components.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

padding: var(--dsc-dialog-spacing);
position: fixed;
width: 100%;
z-index: calc(infinity); /* non-modal dialog has no z-index, but we want a good default here */

@eirikbacker eirikbacker Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Preview deployments for this pull request:

storybook - 30. Jul 2026 - 12:51

Comment thread packages/css/src/dialog.css
Co-authored-by: Tobias Barsnes <tobias.barsnes@digdir.no>
@eirikbacker
eirikbacker requested a review from Barsnes July 30, 2026 09:46
@eirikbacker
eirikbacker merged commit d9caa81 into main Jul 30, 2026
16 checks passed
@eirikbacker
eirikbacker deleted the fix/dialog-non-modal-z-index branch July 30, 2026 10:59
@github-actions github-actions Bot mentioned this pull request Jul 30, 2026
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.

non-modal dialog has no z-index

3 participants