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

Custom Control - PointerEventHandler error with SVG on IE9 #8633

Closed
aalices opened this issue Sep 14, 2018 · 4 comments
Closed

Custom Control - PointerEventHandler error with SVG on IE9 #8633

aalices opened this issue Sep 14, 2018 · 4 comments
Labels

Comments

@aalices
Copy link

aalices commented Sep 14, 2018

Hello all!

First of all, I've read that IE9 is no longer supported in OL but there might be a workaround for this.
So, I wanted to create a custom Control for my map, so I created a structure like this:

<div>
  <button>
    <svg><path /><svg>
  </button>
<div>

And set the wrapping div as Control's element. It works fine for most browsers but on IE9 it crashes here: https://github.com/openlayers/openlayers/blob/master/src/ol/pointer/PointerEventHandler.js#L358 with an error Object doesn't support property or method 'contains' as the continer attribute is of type SVGPathElement .
Any ideas for making it work ?

@fredj
Copy link
Member

fredj commented Oct 1, 2018

What about not passing the div to your custom Control and register a onclick event listener?

@aalices
Copy link
Author

aalices commented Oct 2, 2018

@fredj I'll try that in a moment but would it be still reasonable to make it a custom Control and just a non-OL HTML element?

@fredj
Copy link
Member

fredj commented Oct 2, 2018

@aalices yes, that a good question! (I personally never create a control by extending Control)

@stale
Copy link

stale bot commented May 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 22, 2019
@stale stale bot closed this as completed May 29, 2019
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