Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OverlayPanel is hidden when i uncheck a checkBox input #14338

Open
faten-kardous opened this issue Dec 12, 2023 · 2 comments
Open

OverlayPanel is hidden when i uncheck a checkBox input #14338

faten-kardous opened this issue Dec 12, 2023 · 2 comments
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Milestone

Comments

@faten-kardous
Copy link

Describe the bug

when overlay panel is dismissable and we add a checkbox inside the panel, click on the checkbox then uncheck it, the panel will be hidden.
the problem comes from the fact that the document event listener of the overlaypanel is fired after the svg element of the checkbox was removed from the dom so, this.container?.contains(event.target) is returning false
image

Environment

windows
chrome, Microsoft edge
angular 16
primeng 16

Reproducer

No response

Angular version

16

PrimeNG version

16

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

17

Browser(s)

No response

Steps to reproduce the behavior

add this code to the html component:

<div class="card flex justify-content-center">
  <p-overlayPanel #op [dismissable]="true" showCloseIcon="true">
    <div class="card flex justify-content-center">
      <p-checkbox
        [(ngModel)]="checked"
        [binary]="true"
        inputId="binary"
      ></p-checkbox>
    </div>
  </p-overlayPanel>
  <p-button
    (click)="op.toggle($event)"
    icon="pi pi-image"
    label="Show"
  ></p-button>
</div>

1-open the panel by clicking on the button show
2-click on the checkbox
3-second click on the checkbox

Expected behavior

the panel should not be hidden

@faten-kardous faten-kardous added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 12, 2023
@thoussem
Copy link

same issue here, any updates ?

@mertsincan mertsincan added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 4, 2024
@mertsincan mertsincan added this to the Future milestone Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
Status: Review
Development

No branches or pull requests

3 participants