tirejs/tire — pull request #17 by jonykrause (2013-04-19 09:32:21+00:00)
Title: Prevent context from being overridden when selecting elements using "find"

Came across the following problem the other day:

When selecting elements using the "find" method the result is not as expected. This originates from the "set" method overriding context. Instead, when transforming selected DOM nodes to tire objects, one could use a fresh new tire object, that inherits from context. This makes the find method working as expected. In addition, it also seems to run faster.

To quickly illustrate the problem I created two fiddles:
- "find" as it currently works – not as expected http://jsfiddle.net/jonykrause/6yubE/3/
- "find" working as expected http://jsfiddle.net/jonykrause/ZuKR7/6/

There’s also a test that describes the problem more detailed, see my commit.
Let me know what you think :)