I have this code:
<p:commandButton value="Modal" type="button" onclick="PF('dlg').show();" />
<p:dialog header="Modal Dialog" widgetVar="dlg" modal="true" height="100">
<h:outputText value="This is a Modal Dialog." />
<p:inputText id="input" value="#{bean.text}" required="true"/>
</p:dialog>
If I press the enter key when the dialog is shown without fill the required field "input", the dialog is closed and the required validation for my inputText is not working. Can anyone tell me what I'm doing wrong?
Thank you all.