Skip to content

Event.target not set for mouseEnter/Leave w/o jQuery in IE11 #17228

@simonihmig

Description

@simonihmig

While working on #17227, and having somehow figured out how to run the (ES5-transpiled, jQuery-less) tests in the browser (used /tests/index.html?ie=true&dist=prod&skipPackage=container%2Cember-testing%2C%40ember%2Fdebug&moduleId=4a92ac35&jquery=none), I found that a couple of tests are failing in IE11 due to Event.target being null when using the special handling of mouseEnter/Leave when jQuery is not used.

It's only those assertions for Event.target, the actual events get fired correctly. See here:
bildschirmfoto 2018-11-24 um 02 09 38

This brings up two questions:

  1. why weren't these failing in CI? I guess the browserstack tests do not run the no-jquery tests, but not sure. @rwjblue can you confirm?

  2. how to fix this? The event target is set here for the fake event used in the special handling of mouseEnter/Leave (introduced in [BUGFIX release] fix mouseEnter/Leave event delegation w/o jQuery #16999): https://github.com/emberjs/ember.js/blob/master/packages/%40ember/-internals/views/lib/system/event_dispatcher.js#L326
    It seems for IE11 this is a readonly, non-configurable property, so neither directly setting it nor using defineProperty() (as it is now) works for IE. And of course we cannot use a native Proxy. 🤔

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions