You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Gerolf Seitz (JIRA)" <ji...@apache.org> on 2008/03/26 11:27:25 UTC

[jira] Resolved: (WICKET-1280) Autocomplete onchange event gets fired twice when selecting with mouse click

     [ https://issues.apache.org/jira/browse/WICKET-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerolf Seitz resolved WICKET-1280.
----------------------------------

    Resolution: Fixed

clicking on a list item generates events in the following order:
ac.onchange()
ac.onblur()
item.onclick()
item.onchange()

solution:
wrap ac.onchange() and only execute ac.onchange() if mouseactive==0
set mouseactive=0 in item.onclick() (fire onchange after click)
and ac.onkeydown[key_enter] (fire onchange after ENTER key pressed, even with mouse over the list)



> Autocomplete onchange event gets fired twice when selecting with mouse click
> ----------------------------------------------------------------------------
>
>                 Key: WICKET-1280
>                 URL: https://issues.apache.org/jira/browse/WICKET-1280
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Firefox, Opera
>            Reporter: Conny Kuehne
>            Assignee: Gerolf Seitz
>             Fix For: 1.3.3
>
>
> When selecting on of the choices of the autocomplete field per mouse click the onchange event fires twice.
> The first onchange event is fired by the browser in response to the mouseclick. The second one is fired by the autocomplete.js.
> If you hook an onchange event listener to the ac (as in the wicket example) field it gets called twice per selection. The first time the text entered by the user
> gets submitted. The second time the selected choice is submitted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.