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

IE / Edge: Unable to get property 'x' of undefined or null reference #6800

Closed
hyperknot opened this issue Jun 12, 2018 · 6 comments
Closed

Comments

@hyperknot
Copy link

hyperknot commented Jun 12, 2018

mapbox-gl-js version: 0.45.0
browser: all kind of Microsoft browsers: IE 11, Edge 16-17, Edge Mobile 14-15

No idea what triggers it, I believe it's as simple as clicking on the canvas when a

map.on('click', ...)

is registered.

Traceback:
https://sentry.io/share/issue/b5ae207185f2486ea311e4a63a37c39f/

@jfirebaugh
Copy link
Contributor

Thanks for the report @hyperknot, but I'm afraid unless you have more information about how to trigger it, this is not going to be actionable for us.

@hyperknot
Copy link
Author

hyperknot commented Jun 16, 2018

OK, there is one single report from Firefox 60, about the same error. In Firefox, the error message is:

e is null

I think the issue is actually quite simple.

  1. In some cases bind_handlers.js/onMouseDown does not initialise startPos, for example because the event is actually a touch event.
  2. Then onClick is fired (which can be a TouchEvent as well!), trying to compare with null.x, which doesn't work, rightfully so.

I guess the logic needs to be revised about how to handle touch based events + onClick.

And also a simple check like

if (startPost && pos.equals(startPos)) {
    map.fire(new MapMouseEvent('click', map, e));
}

would help to make sure it works.

@hyperknot
Copy link
Author

Anyone who can try to test this on windows touch devices?

@mourner
Copy link
Member

mourner commented Mar 14, 2019

@hyperknot hey, would you like to submit a PR for this?

@hyperknot
Copy link
Author

hyperknot commented Aug 5, 2019 via email

@mourner
Copy link
Member

mourner commented Aug 5, 2019

This was likely fixed by #8462 and is a duplicate of #7864.

@mourner mourner closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants