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

CommandButton confirm dialog throws JS error when page load is slow #9617

Closed
mertsincan opened this issue Jan 9, 2023 · 0 comments
Closed
Assignees
Labels
12.0.3 🐞 defect Bug...Something isn't working
Milestone

Comments

@mertsincan
Copy link
Member

Reported By PRO User;

having some issues when using p:confirm inside p:commandButton. Problem occurs when the connection to a server is slow (for example through VPN). Please take a look at attached project. You can simulate it through development tools in network tab. Mark checkbox "Disable cache" and set connection next to it to "Slow 3G". Now when you refresh the page and click on "First confirm" button as soon as the view is loaded, then the dialog is not shown and JS error occurs "Cannot read properties of undefined (reading 'DialogHandler')". Problem might be caused because of this optimalization snippet in web.xml:

<context-param>
<param-name>primefaces.MOVE_SCRIPTS_TO_BOTTOM</param-name>
<param-value>true</param-value>
</context-param>

Note: For now, this bug has been fixed with null checks. Structures in core.js that make such component calls in future versions can be moved to a separate section in component.js.

@mertsincan mertsincan added 🐞 defect Bug...Something isn't working 12.0.3 labels Jan 9, 2023
@mertsincan mertsincan added this to the 13.0.0 milestone Jan 9, 2023
@mertsincan mertsincan self-assigned this Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
12.0.3 🐞 defect Bug...Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant