OverlayPanel: Dismissable prop is disregarded when panel is visible

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

Nobody has claimed this yet.

Assessment

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

Research direction

Start at the OverlayPanel component entry point and reproduce the behavior with the linked StackBlitz example. Trace how the dismissable prop is read while the panel is visible, then verify that an outside click respects its current value and that the reproducer no longer closes when dismissable is false.

Written by the indexing model from the issue text.

Description

Status: Needs Triage
Describe the bug

Changing dismissable prop after OverlayPanel is visible, doesn't alter the behaviour.

Reproducer

https://stackblitz.com/edit/vitejs-vite-atntbqzz?file=src%2FApp.tsx

System Information
System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 14.70 GB / 31.67 GB
  Binaries:
    Node: 24.6.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 4.9.2 - C:\Program Files\nodejs\yarn.CMD
    npm: 11.5.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 144.0.7559.97
    Edge: Chromium (142.0.3595.90)
    Firefox: 138.0.1 - C:\Program Files\Mozilla Firefox\firefox.exe
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    primereact: ^10.9.7 => 10.9.7
    react: ^19.2.3 => 19.2.3
    tailwindcss: ^4.1.18 => 4.1.18
Steps to reproduce the behavior
  1. Click "Open overlay"
  2. Click "Toggle dismissable" inside the overlay
  3. See that the dismissable state is changed to false
  4. Click outside the overlay
  5. See that the overlay closes
Expected behavior

Would expect OverlayPanel to use the current state of dismissable, to decide if it should close. This would align with they way closeOnEscape reacts.

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

Getting set up

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.

More from primefaces/primereact

All issues in primefaces/primereact

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.