Enter Key Press behave like Submit in JSF

前端 未结 6 1541
鱼传尺愫
鱼传尺愫 2021-01-01 07:14

How to make Enter Key Press behave like Submit in JSF. It works with InputBoxes; but not with inputSecret boxes

6条回答
  •  既然无缘
    2021-01-01 07:52

    There is an old specification that pops into my mind with this one. If you have a form that contains just one input field, the behaviour of submitting on the enter-key doesn't work in some versions of Internet Explorer. The easiest fix is to make sure you have more than one input field.

    Other reasons for this problem include...

    • Not having an input of type submit
    • Having an input of type submit, but it isn't visible on the page (hidden or positioned off-page)

    This behaviour is very specific to this browser.

    MS Bug Report Here: connect.microsoft.com: submit button value not posted with form submission

提交回复
热议问题