I updated an application from primefaces 6 to 10.0.12 and now when i stack two dialogs and hit ESC they close on wrong order and sometimes they close at the same time with just one ESC.
With this simple test we can see the strange behavior:
Code: Select all
<h:form>
<p:commandButton value="Modal" type="button" onclick="PF('dlg1').show();" />
<p:dialog header="Modal Dialog" widgetVar="dlg2" modal="true" height="100" closeOnEscape="true">
<h:outputText value="Dialog 2" />
</p:dialog>
<p:dialog header="Modal Dialog" widgetVar="dlg1" modal="true" height="100" closeOnEscape="true">
<h:outputText value="Dialog 1" />
<p:commandButton value="Modal" type="button" onclick="PF('dlg2').show();" />
</p:dialog>
</h:form>
1 - Open dialog 1
2- Open dialog 2
3 - hit ESC
Behavior: The bottom dialog is closed first
PS: I saw the link https://github.com/primefaces/primefaces/issues/6677 that appear to show some changes on the dialog.
Thanks!!!!