Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
IE Edge - inline style "display: none;" overridden by Highcharts "display: block !important;" #6803
Container of the Graph with a style of display: none, should stay hidden in IE Edge.
Highcharts overrides the inline style with display: block !important;
Live demo with steps to reproduce
@jackkhanjar The solution could be tested when using the github version of Highcharts (next release candidate). Please check this demo (notice script src pointing to github.highcharts.com): http://jsfiddle.net/xfucv9zn/7/
I have tested this on IE11 and Edge and chart is not visible - as it should, so the problem is resolved. However, please let us know if the fix is not working for you, so we could improve it.
referenced this issue
Jun 22, 2017
It looks like the issue still exists. I encountered this problem when moving from Highcharts version 5.0.10 to 5.0.14.
Consider a little bit more complicated example: http://jsfiddle.net/xfucv9zn/21/.
In this example the div with the 'graph-container' class has a parent div which also has display style set to 'none'. This causes the 'graph-container' div to get the 'block !important' style. Which, as you will see, is never changed back to 'none' (at least not in IE or Edge).
After that we remove the 'none' display style from the parent div (see the setTimeout function call).
Expected behavior is that the chart is not shown. But when run with Highcharts 5.0.14 the highchart is shown due to the display style 'block !important' which is stuck and can't be changed back to 'none'.
When run with Highcharts 5.0.10 it works as expected and the chart is not shown.
As someone mentioned earlier in the comments it looks like there is a problem with setting the display style back to 'none' after previously setting it with the important flag in the IE and Edge.
(I was using Edge v. 40 and IE 11)
The problem is that it's not possible to override a style property if it's priority is
Edge v. 41 seems to be working correctly without the workaround.
The workaround doesn't break anything on tested so far: