-
-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find and findAll helpers do not use HTML element context properly #351
Comments
the reason for this is that the |
We should probably add an assertion to help make this clearer (and prevent folks from having to track it down)... |
@Turbo87 Thanks for clearing that up. I don't feel like this would be super tough to implement, and it would definitely be a very helpful feature, as almost every find/findAll we do has some sort of context. This limitation is pretty much the only thing stopping us from ditching ember-native-dom-helpers completely. |
Are you willing to reconsider adding |
qunit-dom is doing a bit more and have a slightly different API though. instead of |
To reiterate from prior conversations on this, the The path forward here to prevent accidental trollage is to trigger an error when passing a second argument. As mentioned in #351 (comment). |
@rwjblue We recently refactored our addons and apps from Ember 2.18 to 3.5. Usage of |
The most likely reason for it to transform to |
@rwjblue I find this confusing as well. If Ember team wants to push away from jQuery towards using native |
Yes! That is exactly what I said in #351 (comment) above, in both of the RFCs (emberjs/rfcs#268 and emberjs/rfcs#232) and in #278. |
#358 implemented assertions that I was referring to in #351 (comment). Closing... |
It seems that both the
find
andfindAll
helpers do not properly use context if you pass in an HTML element. For example:Instead of looking within myHTMLElement, the helpers seem to look within the first element with myHTMLElement's selector. When I switch back to using
find
from ember-native-dom-helpers, the above code works properly.The text was updated successfully, but these errors were encountered: