[
https://issues.apache.org/jira/browse/WICKET-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sven Meier resolved WICKET-4998.
--------------------------------
Resolution: Fixed
Fix Version/s: 6.6.0
Assignee: Sven Meier
Please test thoroughly, I had to change a few things to adapt for the new
non-inline event handlers.
> AjaxFormComponentUpdatingBehavior("onkeypress") is triggered when Enter is
> used on autocomplete list
> ----------------------------------------------------------------------------------------------------
>
> Key: WICKET-4998
> URL: https://issues.apache.org/jira/browse/WICKET-4998
> Project: Wicket
> Issue Type: Bug
> Components: wicket-extensions
> Affects Versions: 6.4.0
> Reporter: james yong
> Assignee: Sven Meier
> Labels: autocomplete, onkeypress
> Fix For: 6.6.0
>
>
> Given a text field that uses the following behaviors:
> A. AjaxFormComponentUpdatingBehavior("onkeypress")
> B. AutoCompleteBehavior
> Say I enter an letter 'U' into the text field, and an auto-suggest list pops
> up.
> When I select an item (e.g. USD) from the auto-suggest list using the Enter
> keypress, an onkeypress event is fired by behavior A.
> To rectify this problem which didn't happen in wicket 1.4x, I changed the
> following in wicket-autocomplete.js,
> Wicket.Event.add(obj,"keypress",function(jqEvent){
> if(Wicket.Event.keyCode(jqEvent)===KEY_ENTER){
> if(selected>-1||hidingAutocomplete===1){
> hidingAutocomplete=0;
> jqEvent.stopImmediatePropagation(); <------changed
> from jqEvent.stopPropagation();
--
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