Kozea / Kozea/pygal

tooltips in svg files not working in IE11

Open
#409 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
2.8k
Forks
419
PR merge metrics
No merged PRs in 30d

Description

First of all: thx for providing and maintaining this great lib! I'm generating svg files which include tooltips. Everything displays wonderfully in Chrome but tooltips do not display in IE11 and Edge. Error messages in the tooltips js code provided under IE11 are:
_Unable to get property 'add' of undefined or null reference_
and same for _'remove' property._ This message refers to the property of the _classList object_ and Microsoft clearly states they are not supporting _classList_ in IE11/Edge.
There is a shim under https://github.com/eligrey/classList.js which provides a cross browser solution for _classList_, but I can't get it working. Can somebody help, how the classList.js needs to be plugged together with the tooltips js?
I guess a good solution from a pygal perspective would be to integrate the shim into /kozea.github.io/pygal.js/2.0.x/pygal-tooltips.js or provide in this location an alternative tooltips js including the shim.

Contributor guide

Open the contributing guide

Research direction

Start with /kozea.github.io/pygal.js/2.0.x/pygal-tooltips.js and inspect its classList.add and classList.remove calls. Compare the tooltip behavior in Chrome with IE11 and Edge, then evaluate the classList.js shim mentioned in the issue. Done means SVG tooltips work without the reported add/remove errors in IE11 and Edge.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.