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

Component: Dialog - error when using Headless mode #15364

Closed
nckirik opened this issue Apr 25, 2024 · 2 comments
Closed

Component: Dialog - error when using Headless mode #15364

nckirik opened this issue Apr 25, 2024 · 2 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@nckirik
Copy link

nckirik commented Apr 25, 2024

Describe the bug

when Dialog becomes visible in headless mode, i get this error.

ERROR TypeError: this.contentViewChild is undefined

the error and stack trace generated by the run time wasn't helpful, so i tried to trace the error.

  • when modal is set to visible, animation starts and onAnimationStart method gets called
  • if the focusOnShow isn't disabled focus method gets called.
  • focus directly references contentViewChild in its parameters and its body.
  • contentViewChild is also directly referenced in onResize method, but since headless doesn't have the ability to be resized or dragged, it won't be called.

currently, the only workaround i can see is using [focusOnShow]="false" so focus won't be called

Environment

AnalogJS in NX workspace

AnalogJS: 1.2.2
NX: 18.3.2
PrimeNG: 17.14.1
Angular: 17.3.5
Node:

Reproducer

https://stackblitz.com/edit/github-ruzusn?file=src%2Fapp%2Fapp.component.ts

Angular version

17.3.5

PrimeNG version

17.14.1

Build / Runtime

TypeScript

Language

TypeScript

Node version (for AoT issues node --version)

20.12.2

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

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

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

@nckirik
Copy link
Author

nckirik commented Dec 16, 2024

thx anyway, I'll try it again after migrating to 18

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