primefaces / primefaces/primereact

OverlayPanel: After interaction two mouse clicks are needed to close dialog

Open
#8,544 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 a button inside an OverlayPanel is clicked, two clicks outside of the dialog are necessary to close the dialog. If no interaction inside the dialog has happened, the dialog can be closed with a single mouse click.

Reproducer

https://stackblitz.com/edit/kt8tihbc

System Information
System:
    OS: Linux 7.0 Fedora Linux 43 (Workstation Edition)
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900K
    Memory: 66.42 GB / 125.46 GB
    Container: Yes
    Shell: 5.3.0 - /bin/bash
  Binaries:
    Node: 22.22.2 - /usr/bin/node
    Yarn: 4.15.0 - /usr/local/bin/yarn
    npm: 10.3.0 - /usr/local/bin/npm
    bun: 1.1.4 - /usr/local/bin/bun
  Browsers:
    Chrome: 148.0.7778.178
    Firefox: 151.0.1
    Firefox Developer Edition: 151.0.1
Steps to reproduce the behavior
  1. Open OverlayDialog
  2. Click a button inside the dialog, e.g. pagination button
  3. Click outside the dialog - the dialog should be closed but is not
  4. Click again outside the dialog - the dialog will be closed
Expected behavior

The dialog should be closed on the first click outside of the 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 by reproducing the behavior in the linked StackBlitz example and then trace the OverlayPanel entry point and its outside-click handling after an internal button interaction. Done means the first click outside the dialog closes it, with the existing interaction behavior preserved.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.