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

16.3.1 regression: p-overlayPanel dismisses when making changes to nested p-multiSelect #13601

Closed
NateRadebaugh opened this issue Sep 1, 2023 · 15 comments · Fixed by #13809
Closed
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@NateRadebaugh
Copy link

Describe the bug

I have a p-multiSelect inside of p-overlayPanel. When the user toggles selection of a p-multiSelect, the p-overlayPanel dismisses.

This is a regression that started when I upgraded from 16.1.x to 16.3.1.

Environment

browser

Reproducer

No response

Angular version

16.2

PrimeNG version

16.3.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v18.17.1

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Open overlay panel
  2. Open multiselect
  3. Choose an item
  4. Overlay panel closes automatically!

Expected behavior

Overlay panel should stay open until I click away or programatically close it.

@NateRadebaugh NateRadebaugh added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 1, 2023
@penihel
Copy link

penihel commented Sep 1, 2023

i think i have the same problem with p-calendar here #13605

@penihel
Copy link

penihel commented Sep 8, 2023

nothing about this?

@penihel
Copy link

penihel commented Sep 20, 2023

nothing ? :(

@gamerish96
Copy link
Contributor

Hi, I have the same problem by using a p-listbox component inside the OverlayPanel. The problem is present starting from version 16.3.0, as I found out by testing the versions from 16.0.0 to 16.3.1 the last "safe" version where the bug is not present is 16.2.0.

By navigating the issues I think the regression was introduced with the fix from #13480.

@penihel
Copy link

penihel commented Sep 30, 2023

nothing ? :(

anlampe added a commit to anlampe/primeng that referenced this issue Oct 5, 2023
…ct click on scrollbar, prevent hiding when selecting dropdown options
anlampe added a commit to anlampe/primeng that referenced this issue Oct 5, 2023
…ct click on scrollbar, prevent hiding e.g. when selecting dropdown options
@anlampe
Copy link
Contributor

anlampe commented Oct 5, 2023

Hi @gamerish96, I created a second PR #13810 which restores even more of the original code of the OverlayPanel, because your fix alone didn't work for us (See stackblitz example). Maybe you could have a look.

@gamerish96
Copy link
Contributor

Hi @anlampe, I tested your example with the dropdown with my fix applied and without the appendTo="body" it works, you could try it too.

@anlampe
Copy link
Contributor

anlampe commented Oct 6, 2023

Hi @anlampe, I tested your example with the dropdown with my fix applied and without the appendTo="body" it works, you could try it too.

Sure, but it also worked with appendTo="body" before, so I'd perfer to fix both. Thanks for having a look.

@zakharenkov
Copy link

zakharenkov commented Oct 12, 2023

I confirm. Appears in version 16.5.0.
The problem appears if you uncheck the checkbox itself, and not the string next to it!
Workaround: e?.originalEvent?.stopPropagation() in OnChange.

@jayee
Copy link

jayee commented Oct 27, 2023

Please fix this annoying bug

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 1, 2023
@cetincakiroglu cetincakiroglu added this to the 16.7.0 milestone Nov 1, 2023
anlampe added a commit to anlampe/primeng that referenced this issue Nov 2, 2023
…ct click on scrollbar, prevent hiding e.g. when selecting dropdown options
anlampe added a commit to anlampe/primeng that referenced this issue Nov 2, 2023
…ct click on scrollbar, prevent hiding e.g. when selecting dropdown options
@NateRadebaugh
Copy link
Author

NateRadebaugh commented Nov 6, 2023

This is not fixed in 16.7.1 still

@anlampe I've found that this reproduces when I use appendTo="body" on the p-multiSelect inside of the p-overlayPanel since the updated code in p-overlayPanel considers it a "click away" even though the actual component is within the overlay.

Here's a stackblitz simple example:
https://stackblitz.com/edit/stackblitz-starters-hzx9fv?file=src%2Fmain.component.html

@anlampe
Copy link
Contributor

anlampe commented Nov 6, 2023

Yes, I'm aware of this issue (See #13601 (comment)). Unfortunately only #13809 was merged, so I updated #13810 and am still waiting for a review.

@NateRadebaugh
Copy link
Author

Thanks -- @cetincakiroglu is this something on your radar?

@anlampe
Copy link
Contributor

anlampe commented Nov 15, 2023

Since the two issues I referenced in my PR are closed and I still didn't receive any recation for more than a month now, I'd suggest to create a new one which explicitly addresses the bug with appendTo="body".

@NateRadebaugh
Copy link
Author

NateRadebaugh commented Nov 15, 2023

Good idea, I've opened a new bug with the updated details #14120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants