-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
hasAttribute is not a function #16730
Comments
Do you have a reproduction? Your guess is probably correct, but we really need to confirm what |
Not yet, we'll work on one. Our logs don't provide a lot of insight. Thanks for the quick response. |
No problem! We definitely want to get this fixed ASAP, so please let us know how we can help... |
I have been getting this error in IE11 when excluding jquery from the build, and I've got a repro case for it: https://github.com/timmorey/svg-has-attribute-error (sorry, tried to repro in a twiddle, but I couldn't get twiddle to run in IE11). The error occurs when I hover over an
In chrome, firefox, safari, the above works fine. It also works fine in IE11 if I include jquery in the build. |
I just had this problem when trying to disable jquery from my app using Ember v3.3.0. I'm on Firefox 62.0b8 (64-bit). This does not happen on Chrome. Here is a simple reproduction for my case: <a
href="#"
onclick={{action 'changeTimeframe' 'someValue'}}
class="btn-tab">
My Link
</a> The error is triggered when I hover the link. |
We are having the same issue in our application that is running on Ember 3.1.2. It seems to happen in the following scenarios:
The way I got around it was to disable drag events in customEvents in
This solution is not ideal but it seems like it might solve our issue until this bug is fixed. |
I have created a reproduction for the error I'm getting. The error only appears in firefox. https://github.com/josemarluedke/--has-attribute-bug Interestingly, the problem only appears when styles are applied. In the app I have described how to reproduce. |
I am seeing this as well in Sentry logs. FWIW, most events were Firefox, but occasionally also Chrome... |
Is this still an issue for folks on 3.6.0? |
@rwjblue we are still seeing this in Ember 3.7.0 + IE 11 with jQuery disabled. |
@rwjblue I am also still seeing this on 3.7 in Firefox 64 |
I'm still seeing this in Ember v3.12.0-canary+106bb03e without jQuery. |
I was able to get a PR to fix this issue. The fix was obvious simple, but creating a test for it was a challenge. |
We're getting a lot of errors from
packages/ember-views/lib/system/event_dispatcher.js
in our application. It stems from a call totarget.hasAttribute('data-ember-action')
because hasAttribute is not defined on target. I haven't been able to identify what event is causing it, but it seems it is likely something where window is the target.I'll submit a PR if you want to let me know how you want to guard against this. Seems like changing the line to
else if (target && target.hasAttribute && target.hasAttribute('data-ember-action'))
would work. I'm assuming there is a reason its a do-while loop and not while, otherwise converting to a while loop should also prevent it.We're running Ember 3.1.2. Also just fyi, we were previously receiving the same error on Ember 2.x when running ember-native-dom-event-dispatcher. I previously reported the issue in that repo.
Source Code
The text was updated successfully, but these errors were encountered: