[ 
https://issues.apache.org/jira/browse/WICKET-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254630#comment-13254630
 ] 

Martin Grigorov commented on WICKET-4499:
-----------------------------------------

With #setDefaultButton() you can set which button to be used as submitter if 
the user presses ENTER key in any text field.
If you want to not submit at all when the user press ENTER then you need to add 
a JavaScript event listener (onkeydown, onkeyup) that checks the keyCode and do 
disables the default behavior when the key is ENTER (13).
                
> Pressing Enter in a Text Field invokes the default ( first) submit Button: 
> Bug or Feature ? 
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4499
>                 URL: https://issues.apache.org/jira/browse/WICKET-4499
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: otto
>            Priority: Minor
>         Attachments: testCase1.zip
>
>
> When entering a text in a Text field, the first found submit Listener is 
> executed.
> This happens, when the form contains at least two Text Fields. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to