datamaps icon indicating copy to clipboard operation
datamaps copied to clipboard

Mouseout not triggering in IE Edge

Open nosro opened this issue 9 years ago • 7 comments

I see a mouseout bug which leaves the state highlight color active and doesn't close the hover popUp window.

This bug occurs when I view the demo at http://datamaps.github.io in IE edge app versions 25.10586.0.0 and 34.14300.1000.0 (rendering engine versions 13 and 14, respectively).

It may be related to this fix which was applied to fix a similar bug in previous versions of IE, but I think the fix doesn't detect IE Edge: https://github.com/markmarkoh/datamaps/issues/19

nosro avatar Sep 08 '16 20:09 nosro

If I comment out this line, the bug goes away in IE Edge: https://github.com/markmarkoh/datamaps/blob/master/src/js/datamaps.js#L264

So it looks like the browser detection needs to be extended to cover Edge - or maybe this moveToFront call can be accomplished in a way that doesn't cause IE to have problems?

nosro avatar Sep 08 '16 20:09 nosro

Maybe use broader IE detection like http://stackoverflow.com/questions/33152523/how-do-i-detect-ie-and-edge-browser

if (document.documentMode || /Edge/.test(navigator.userAgent)) { ... }

nosro avatar Sep 13 '16 02:09 nosro

This worked for me: if ( ! /((MSIE)|(Trident)|(Edge))/.test(navigator.userAgent) ) { moveToFront.call(this); }

petersjoo avatar Dec 01 '16 08:12 petersjoo

@petersjoo any way you can send a pr for that?

markmarkoh avatar Dec 01 '16 17:12 markmarkoh

Facing the same issue . I don't want to make any in the library (datamaps )file. Suggest me anything to change in my own .js file which uses this library.

ghost avatar Mar 14 '18 07:03 ghost

I had to change this file in my local node_modules to generate a new bundle with no bugs. I know that this is ugly. There is already a PR for this issue, please merge that. 🙏

siminino avatar May 22 '18 00:05 siminino

@markmarkoh any way you can merge that pr?

joke1 avatar Feb 18 '19 20:02 joke1