-
Notifications
You must be signed in to change notification settings - Fork 778
Description
Describe the bug
We have a p:commandButton with type="button" that is used to close another dialog with Javascript.
Since updating to PF14 this does not work anymore.
Clicking "Yes" does nothing and leaves the button in an unusable state.
Removing type="button" restores the expected behavior, but causes an unnecessary request to be sent, which should be avoided.
Possibly related:
Reproducer
<p:commandButton type="button" value="Execute JS" onclick="console.log('executed')">
<p:confirm message="really?"/>
</p:commandButton>
<p:confirmDialog global="true">
<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="pi pi-check"/>
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="pi pi-times"/>
</p:confirmDialog>
Expected behavior
Execute the script specified in "onclick" upon confirming.
Worked with PF11. Unfortunately I can't get my primefaces-test reproducer to work with PF11 to verify this behaviour again.
PrimeFaces edition
None
PrimeFaces version
14.0.12
Theme
No response
JSF implementation
Mojarra
JSF version
4.0
Java version
21
Browser(s)
No response
Metadata
Metadata
Assignees
Labels
🐞 defectBug...Something isn't workingBug...Something isn't working