1. Wicket
  2. WICKET-4857

AutoCompleteTextFields submits Form if a choice is selected via enter-key


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0, 6.1.0, 6.1.1, 6.2.0
    • Fix Version/s: 6.3.0
    • Component/s: wicket-extensions
    • Labels:


      I am not quite sure if this is really a bug, but the behaivor of wicket 1.5 and wicket 6 differs in the following situation:

      In wicket 1.5 a user could select a choice in an AutoCompleteTextField via the enter-key and the underlying Form was not submitted.
      In wicket 6 however the Form gets submitted in that case.

      Note: the behaivor is in both versions identical (aka no form submit) if no button is added to the form. Thus in both versions the Form is not submitted if the user selects a choice via mouse-click.

      While in some use cases it is useful that hitting the enter-key in TextFields submits the form - e.g. in a search panel, in this particular use case the form should not be submitted. Or at least, there should be a (built in) hook to prevent this behaivor.

      1. myproject-1.5.zip
        38 kB
        Marcel Hoerr
      2. myproject-6.2.0.zip
        36 kB
        Marcel Hoerr

        Issue Links


          Marcel Hoerr created issue -
          Marcel Hoerr made changes -
          Field Original Value New Value
          Attachment myproject-1.5.zip [ 12552115 ]
          Attachment myproject-6.2.0.zip [ 12552116 ]
          Martin Grigorov made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Martin Grigorov [ mgrigorov ]
          Fix Version/s 6.3.0 [ 12323327 ]
          Resolution Fixed [ 1 ]
          Sven Meier made changes -
          Link This issue relates to WICKET-4998 [ WICKET-4998 ]


            • Assignee:
              Martin Grigorov
              Marcel Hoerr
            • Votes:
              0 Vote for this issue
              5 Start watching this issue


              • Created: