You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2013/01/09 02:45:11 UTC
[jira] [Closed] (TAP5-2047) ElementWrapper#find jQuery
implementation is broken if there is no match
[ https://issues.apache.org/jira/browse/TAP5-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-2047.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.4
Assignee: Howard M. Lewis Ship
> ElementWrapper#find jQuery implementation is broken if there is no match
> ------------------------------------------------------------------------
>
> Key: TAP5-2047
> URL: https://issues.apache.org/jira/browse/TAP5-2047
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.4
> Reporter: Jochen Kemnade
> Assignee: Howard M. Lewis Ship
> Labels: dom, javascript, jquery, patch
> Fix For: 5.4
>
> Attachments: 0001-fix-ElementWrapper-find-for-jQuery-dom-implementatio.patch
>
>
> When `ElementWrapper#find` is called with a selector that does not match any element, an array of two `ElementWrapper`s with `undefined` elements is returned. That happens, because the loop that turns the jquery matches into `ElementWrapper`s iterates from `0` to `matches.length -1`. That means there is one pass for `i=0` and one pass for `i=-1`, because CoffeeScript ranges can also be specified from the higher end to the lower one.
--
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