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:31:44 UTC
[jira] Created: (WICKET-1980) Fixing JS error on autocomplete with
preselect
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
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.
[jira] Resolved: (WICKET-1980) Fixing JS error on autocomplete with
preselect
Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Juergen Donnerstag resolved WICKET-1980.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.4-RC2
Assignee: Juergen Donnerstag
thanks
> 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
> Assignee: Juergen Donnerstag
> Priority: Minor
> Fix For: 1.4-RC2
>
> 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.
[jira] Updated: (WICKET-1980) Fixing JS error on autocomplete with
preselect
Posted by "Ivo Danihelka (JIRA)" <ji...@apache.org>.
[ 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.