[ https://issues.apache.org/jira/browse/TAP5-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jochen Kemnade updated TAP5-2047: --------------------------------- Labels: dom javascript jquery patch (was: dom javascript jquery) > 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 > Labels: dom, javascript, jquery, patch > 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