primefaces / primefaces/primereact

Outside click in OverlayPanel (dismissable prop)

Open
#8,434 2 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

Why was the property "dismissable" implemented in such a way that when clicking on a content, the outsider click doesn't work the first time? In my opinion, this behavior shouldn't be the default, because it looks like a bug. At the very least, I'd like to be able to disable this behavior.

https://github.com/primefaces/primereact/blob/ba4adbe489ad52e6b3c97b989ebb8e494d13079c/components/lib/overlaypanel/OverlayPanel.js#L41C21-L41C72

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 components/lib/overlaypanel/OverlayPanel.js at the linked line and reproduce the reported sequence: click content, then click outside with dismissable enabled. Trace the outside-click handling and verify the first outside click behaves as expected, or that the behavior can be disabled as requested.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.