tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Kemnade (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TAP5-2047) ElementWrapper#find jQuery implementation is broken if there is no match
Date Tue, 08 Jan 2013 14:12:12 GMT
Jochen Kemnade created TAP5-2047:
------------------------------------

             Summary: 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
         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

Mime
View raw message