Skip to content
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

Provide target property for mouseenter/over/leave/out events #6623

Closed
hyperknot opened this issue May 6, 2018 · 4 comments
Closed

Provide target property for mouseenter/over/leave/out events #6623

hyperknot opened this issue May 6, 2018 · 4 comments
Labels

Comments

@hyperknot
Copy link

mapbox-gl-js version: 0.45.0-beta.1
browser: Chrome 66 / macOS

Steps to Trigger Behavior

  1. use e.target in a mouseenter callback

Link to Demonstration

https://codesandbox.io/s/7wyv3pwkyj

Expected Behavior

I didn't find this breaking change in 0.45 release notes, so it might be a bug.

@jfirebaugh
Copy link
Contributor

Thanks for the report. Indeed, the delegated events mouseenter, mouseover, mouseleave, and mouseout do not have a target property.

This isn't a breaking change, however. As the example you posted shows, the same behavior is present in 0.44.2.

@jfirebaugh jfirebaugh changed the title 0.45.0-beta.1 doesn't provide e.target for mouseenter/mouseleave Provide target property for mouseenter/over/leave/out events May 7, 2018
@hyperknot
Copy link
Author

It was still present in 0.44.2:
https://codesandbox.io/s/03qo50z3rw

// I'm not using this feature at all, just wanted to report that this is changed in 0.45

@jfirebaugh
Copy link
Contributor

Ah, you're right -- sorry, I misread the CSS include in your example as a script tag.

I think I see a quick fix we can make for 0.45.

@hyperknot
Copy link
Author

You didn't misread it, in the original example I accidentally had both script and package.json includes, with mismatching versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants