primefaces / primefaces/primereact

ZIndex configuration through provide not working correctly

Open
#8,549 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When attempting to configure the zIndex behavior for prime to keep toasts from displaying behind dialogs it does not seem to properly accept this configuration. Using configuration from docs: https://primereact.org/configuration/

Reproducer

https://codesandbox.io/p/sandbox/intelligent-haslett-jz2ddt

System Information
System:
    OS: macOS 26.5
    CPU: (10) arm64 Apple M4
    Memory: 71.41 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.19.4 - /Users/{{username}}/.nvm/versions/node/v20.19.4/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.8.2 - /Users/{{username}}/.nvm/versions/node/v20.19.4/bin/npm
  Browsers:
    Brave Browser: 147.1.89.132
    Chrome: 148.0.7778.216
    Firefox: 149.0.2
    Safari: 26.5
  npmPackages:
    primereact: 10.9.8 => 10.9.8
    react: 18.3.1 => 18.3.1
Steps to reproduce the behavior
  1. Open reproducer
  2. Notice the toasts are behind the blurred overlay of the dialog despite manual configuration of dialog and toast zIndex in the app file
Expected behavior

zIndex configuration respected, toasts above dialog

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproducer and the PrimeReact configuration documentation, then inspect the app file where dialog and toast zIndex values are provided. Reproduce the stacking issue and trace how the provided configuration reaches those components. Done means the toast appears above the dialog overlay while the documented configuration is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.