-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
event.relatedTarget is undefined on Firefox #2024
Comments
👍 Want to make a pull request for it? |
Yep - working on it now :) |
Tried to use contrib feature submit to do the pull request but ended up getting undefined so instead created it manually #2025 |
Bah, sorry. The contrib steps are out of date. On Thu, Apr 9, 2015 at 6:17 AM, Michelle Anderson notifications@github.com
|
…n Events.trigger. fixes videojs#2024
In src/js/events.js we create the relatedTarget like this (line 55)
The problem is that Firefox does not support event.fromElement. Therefore the above code will overwrite the correct relatedTarget with undefined.
Fix: Firefox does support relatedTarget (https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/relatedTarget). So it simply needs to check the existence of this property before setting it.
note: This issue has already been discussed in ES6ification pull request (https://github.com/videojs/video.js/pull/1976/files#r27894428).
The text was updated successfully, but these errors were encountered: