title: How to submit without closing the rich popup panel?
body: <pre><code>&lt;rich:popupPanel modal="true"&gt;
      &lt;h:form
          id="myModal"
          onkeypress="if (event.keyCode == 13) {
                  alert('ok10');
                  $( &amp;quot;[name$='modalConfirmButton']&amp;quot;).click();
                  if (typeof evt.stopPropagation != 'undefined') {
                      evt.stopPropagation();
                  } else {
                      evt.cancelBubble = true;
                  }
                  return true;
              }"
  
                  &lt;a4j:commandButton
                      value="Cancel"
                      immediate="true"
                      onclick="#{rich:component(cc.attrs.idModal)}.hide(); return false;" /&gt;
  
                  &lt;a4j:commandButton
                      id="modalConfirmButton"
                      value="Confirm"
                      action="#{mb.confirm}" /&gt;
  </code></pre>
  
  <p>If I click the 'confirm' button using the mouse, it will validate the form, and will not close if there are errors.
  But, if I press enter, it will not validate, and will close it.
  If I put the 'cancel' button after the 'confirm' button, it will validade, show the errors, but still close.</p>
  
  <p>Any idea how to make the 'enter' key to work just like the mouse click for 'confirm'?</p>