You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ivo Danihelka (JIRA)" <ji...@apache.org> on 2008/12/15 17:33:44 UTC
[jira] Updated: (WICKET-1980) Fixing JS error on autocomplete with
preselect
[ https://issues.apache.org/jira/browse/WICKET-1980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivo Danihelka updated WICKET-1980:
----------------------------------
Attachment: lazy_preselect.diff
Patch against wicket SVN trunk.
> Fixing JS error on autocomplete with preselect
> ----------------------------------------------
>
> Key: WICKET-1980
> URL: https://issues.apache.org/jira/browse/WICKET-1980
> Project: Wicket
> Issue Type: Bug
> Components: wicket-extensions
> Environment: Firefox 3, Linux.
> Wicket 1.3.4.
> Reporter: Ivo Danihelka
> Priority: Minor
> Attachments: lazy_preselect.diff
>
>
> There is a Javascript error when using the autocomplete text field with preselect.
> The error:
> "element.firstChild is null"
> The affected line is inside getSelectedValue():
> var attr=element.firstChild.childNodes[selected].attributes['textvalue'];
> How to reproduce:
> 1) Type something into the autocomplete text field. The javascript will send an Ajax request.
> 2) Hit enter quickly. When you hit it before the Ajax response arrives, the error occurs.
> It is because the preselect sets selected=0, before sending the Ajax request.
> It should be kept to -1 until the response arrives.
> I'm going to attach a short patch for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.