[BUGFIX beta] fix mouseEnter/Leave event delegation w/o jQuery for SVG & IE11#17227
[BUGFIX beta] fix mouseEnter/Leave event delegation w/o jQuery for SVG & IE11#17227rwjblue merged 1 commit intoemberjs:masterfrom
Conversation
|
Had one failure under the |
|
Hm, ok, I'll check this. Although I did not touch the jQuery-based implementation, so the added test seems to have uncovered this!? |
|
@simonihmig - Yeah, looks like it... |
| (!related || (related !== target && !target.contains(related))) | ||
| (!related || | ||
| (related !== target && | ||
| !(target.contains ? target.contains(related) : contains(target, related)))) |
There was a problem hiding this comment.
I'd vaguely prefer to always use contains(target, related) and tweak the contains util to deal with the ternary, what do you think?
| target && | ||
| target.nodeType === 1 && | ||
| (!related || (related !== target && !target.contains(related))) | ||
| (!related || |
There was a problem hiding this comment.
I know this isn't new, but I'm curious why are we checking !related here? Can we tweak this to avoid boolean coercion? What do we expect target.relatedTarget to be? I was thinking it could only be either undefined or null, if thats correct we could (possibly in a different PR?) tweak to related === undefined && related === null...
There was a problem hiding this comment.
According to the specs the uninitialized value must be null, so I changed this to a strict null check.
5676c4b to
82ee67f
Compare
Not sure why this is happening, but the root cause seems to be with jQuery. With How should we deal with that? Skip the test when using this older version of jquery? Or can we update the test suite's old jQuery version, like using the latest 1.x? |
Lets change our oldest tested jQuery to 1.10.0. Mind updating for that? |
Updates the suite of tests for old jQuery versions to run with latest of 1.10.x, 1.12.x and 2.2.x. Unlocks emberjs#17227 which is failing due to jQuery 1.8 presumably not handling events on SVGs correctly.
|
Perfect, #17268 is landed. Ready for rebase / linting fix now. |
…G elements in IE11 IE11 does not support `Node#contains()` on SVG elements, so in that case a custom fallback implementation is used Fixes emberjs#17225
82ee67f to
62d6096
Compare
|
@rwjblue done, green! :) |
|
Thank you very much @simonihmig! |
IE11 does not support
Node#contains()on SVG elements, so in that case a custom fallback implementation is used.Fixes #17225