1 Reply Latest reply on Sep 30, 2009 4:45 AM by ilya_shaikovsky

    Hitting "enter" in a modal panel does not post form in IE8

    cstefkivoila

      Hello,

      I am now using RichFaces for a few years and I really love it! :D
      It is a very good framework.

      Unfortunately, I found something which seems to be a bug.
      I created a form in a modal panel with two text fields and a submit button.
      The form works perfectly fine if you press the submit button, but it doesn't if you press the "enter" key on IE8.
      This happens only on IE8. It works perfectly fine on IE6, IE7, Firefox and Chrome.

      You would say this doesn't matter because it only affects IE8 but the problem is 25% of the users who come to my website (SearchMedica) are actually using IE8. :(

      Looking on Google, I found the following forum which explains that it's because the form is hidden at page load:
      http://stackoverflow.com/questions/964734/hitting-enter-does-not-post-form-in-ie8

      Could you please advice on how to fix this problem?

      Here is the code to reproduce the bug:

      <rich:modalPanel id="testModalPanel" height="400" width="480" zindex="2000" resizeable="false" showWhenRendered="true">
       <f:facet name="header">
       Test Modal Panel
       </f:facet>
      
       <a4j:form id="testForm">
      
       Username: <h:inputText id="username" maxlength="255" tabindex="1" />
       <br/>
       Password: <h:inputSecret id="password" maxlength="255" tabindex="2" />
       <br/>
      
       <a4j:commandButton id="submit" type="submit"
       value="#{msg.login_signIn}"
       styleClass="submit"
       tabindex="3" />
      
       </a4j:form>
      
      </rich:modalPanel>