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

Dialog/DynamicDialog: Overlay dropdown moving with page while scrolling outside of dropdown. #14518

Closed
kkoripl opened this issue Jan 10, 2024 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@kkoripl
Copy link

kkoripl commented Jan 10, 2024

Describe the bug

When overlay component with a possible dropdown (like autoComplete or dropdown itself) apended to 'body' is opened in the dialog, while page behind the dialog has scroll, the dropdown moves with a page, leaving the input in its original place.

One can see that at demo page for p-dialog: https://primeng.org/dialog at 'Overlays Inside' part.
I've reproduced exact same problem for dynamic dialog locally.

Environment

Windows 10
Primeng v16.9.2-lts + Angular: v16.2.12

Reproducer

https://primeng.org/dialog

Angular version

16.2.12

PrimeNG version

16.9.2-lts

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.6.0+

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to: https://primeng.org/dialog
  2. Open dialog at 'Overlays Inside'
  3. Open cities dropdown by mouse click.
  4. Scroll up and down outside the dropdown.

Expected behavior

The dropdown stays connected to input while the page is scrolled.

@kkoripl kkoripl added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 10, 2024
@mertsincan
Copy link
Member

Hi,

You can use appendTo prop for this case and set p-dialog element to it.

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants