You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Marcel Hoerr (JIRA)" <ji...@apache.org> on 2012/11/05 16:48:12 UTC

[jira] [Created] (WICKET-4857) AutoCompleteTextFields submits Form if a choice is selected via enter-key

Marcel Hoerr created WICKET-4857:
------------------------------------

             Summary: AutoCompleteTextFields submits Form if a choice is selected via enter-key
                 Key: WICKET-4857
                 URL: https://issues.apache.org/jira/browse/WICKET-4857
             Project: Wicket
          Issue Type: Bug
          Components: wicket-extensions
    Affects Versions: 6.2.0, 6.1.1, 6.1.0, 6.0.0
            Reporter: Marcel Hoerr


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4857) AutoCompleteTextFields submits Form if a choice is selected via enter-key

Posted by "Marcel Hoerr (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491501#comment-13491501 ] 

Marcel Hoerr commented on WICKET-4857:
--------------------------------------

Thanks!
                
> AutoCompleteTextFields submits Form if a choice is selected via enter-key
> -------------------------------------------------------------------------
>
>                 Key: WICKET-4857
>                 URL: https://issues.apache.org/jira/browse/WICKET-4857
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 6.0.0, 6.1.0, 6.1.1, 6.2.0
>            Reporter: Marcel Hoerr
>            Assignee: Martin Grigorov
>             Fix For: 6.3.0
>
>         Attachments: myproject-1.5.zip, myproject-6.2.0.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4857) AutoCompleteTextFields submits Form if a choice is selected via enter-key

Posted by "Marcel Hoerr (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Hoerr updated WICKET-4857:
---------------------------------

    Attachment: myproject-6.2.0.zip
                myproject-1.5.zip

quickstarts for wicket 1.5 and wicket 6 added.
                
> AutoCompleteTextFields submits Form if a choice is selected via enter-key
> -------------------------------------------------------------------------
>
>                 Key: WICKET-4857
>                 URL: https://issues.apache.org/jira/browse/WICKET-4857
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 6.0.0, 6.1.0, 6.1.1, 6.2.0
>            Reporter: Marcel Hoerr
>         Attachments: myproject-1.5.zip, myproject-6.2.0.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (WICKET-4857) AutoCompleteTextFields submits Form if a choice is selected via enter-key

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490778#comment-13490778 ] 

Andrea Del Bene edited comment on WICKET-4857 at 11/5/12 6:30 PM:
------------------------------------------------------------------

Returning false instead of jqEvent.stopPropagation() at line 230  (file wiket-autocomplete.js) solves the problem. Alternatively we can add method jqEvent.preventDefault() 

                
      was (Author: bitstorm):
    Returning false instead of jqEvent.stopPropagation() at line 230  (file wiket-autocomplete.js) solves the problem, but I didn't find  why stopPropagation doesn't work.
                  
> AutoCompleteTextFields submits Form if a choice is selected via enter-key
> -------------------------------------------------------------------------
>
>                 Key: WICKET-4857
>                 URL: https://issues.apache.org/jira/browse/WICKET-4857
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 6.0.0, 6.1.0, 6.1.1, 6.2.0
>            Reporter: Marcel Hoerr
>         Attachments: myproject-1.5.zip, myproject-6.2.0.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4857) AutoCompleteTextFields submits Form if a choice is selected via enter-key

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490778#comment-13490778 ] 

Andrea Del Bene commented on WICKET-4857:
-----------------------------------------

Returning false instead of jqEvent.stopPropagation() at line 230  (file wiket-autocomplete.js) solves the problem, but I didn't find  why stopPropagation doesn't work.
                
> AutoCompleteTextFields submits Form if a choice is selected via enter-key
> -------------------------------------------------------------------------
>
>                 Key: WICKET-4857
>                 URL: https://issues.apache.org/jira/browse/WICKET-4857
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 6.0.0, 6.1.0, 6.1.1, 6.2.0
>            Reporter: Marcel Hoerr
>         Attachments: myproject-1.5.zip, myproject-6.2.0.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-4857) AutoCompleteTextFields submits Form if a choice is selected via enter-key

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4857.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.3.0
         Assignee: Martin Grigorov

Thanks Andrea!
                
> AutoCompleteTextFields submits Form if a choice is selected via enter-key
> -------------------------------------------------------------------------
>
>                 Key: WICKET-4857
>                 URL: https://issues.apache.org/jira/browse/WICKET-4857
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 6.0.0, 6.1.0, 6.1.1, 6.2.0
>            Reporter: Marcel Hoerr
>            Assignee: Martin Grigorov
>             Fix For: 6.3.0
>
>         Attachments: myproject-1.5.zip, myproject-6.2.0.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4857) AutoCompleteTextFields submits Form if a choice is selected via enter-key

Posted by "Andrea Del Bene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490786#comment-13490786 ] 

Andrea Del Bene commented on WICKET-4857:
-----------------------------------------

Ok, this post contains a sort of explanation.

http://stackoverflow.com/questions/1357118/event-preventdefault-vs-return-false
                
> AutoCompleteTextFields submits Form if a choice is selected via enter-key
> -------------------------------------------------------------------------
>
>                 Key: WICKET-4857
>                 URL: https://issues.apache.org/jira/browse/WICKET-4857
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 6.0.0, 6.1.0, 6.1.1, 6.2.0
>            Reporter: Marcel Hoerr
>         Attachments: myproject-1.5.zip, myproject-6.2.0.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira