0.19.1 Markup chart type does not display on I.E.
Make sure these boxes are checked before submitting your issue - thank you!
- [X] I have checked the superset logs for python stacktraces and included it here as text if any
- [X] I have reproduced the issue with at least the latest released version of superset
- [X] I have checked the issue tracker for the same issue and I haven't found one similar
Superset version
0.19.1
Expected results
Markup chart (with html code) to display fine in Internet Explorer.
Actual results
The chart shows empty in Internet Explorer.
Steps to reproduce
Internet Explorer in 2017? Also without posting an actual error there's even less chances to have someone who doesn't have IE at hand to try to fix it.
I´m having the same behavior here. I´m using markup boxes with 2 purposes. both with javascript code.
- I use a java script to print the last refresh time. (starting from 0.19.1 I can´t see the date on IE, chrome and Firefox works fine)
- using java script, I set a persistent autorefresh value. (starting from 0.19.1 this is not working at any browser. do you know where can I insert this code? I really need persistent refresh times)
this is the code.
<b><p id="demo" este>Display the result here.</p></b>
<script>
var d = new Date();
document.getElementById("demo").innerHTML = " " + d.toLocaleString();
setTimeout(function() {
location.reload();
}, 120000);
</script>
` Thanks
My issue happens on Internet Explorer 11.
Similar to olbapito, my javascript code in the Html markup chart also stopped working. And for Html markup chart that does not have javascript, I.E doesn't output any display.
The html is along the similar lines of: ` document.getElementById("img_01").src="/images/.XXX.jpg?"+timestamp; ...
That's a security feature, we now sandbox your html/markdown into an iframe to prevent CRSF attacks. We do allow scripting though. More about it here: https://www.w3schools.com/tags/att_iframe_sandbox.asp
is good to hear that security is being taken in concern. Meanwhile and as a workaround to be able to use persistent autorefresh with JS, is there a way to turn sandboxing off? I´ve tried removing the sandboxing in markup.js without result. thanks
what are you trying to autorefresh?
The whole dashboard. I want to avoid people seeing outdated data because they didn´t remember to set the auto refresh every time the access the dashboard.
@mistercrunch We are running into a similar issue -- we are in an enterprise environment and management uses Internet Explorer by default.
This feature isn't related to the contents of the Markup slice -- it has to do with the implementation.
When the markup slice changed to use an iframe, the contents of the iframe are now populated using the srcdoc attribute: https://github.com/apache/incubator-superset/blob/144f516700b7c6d0d4a0db3d4f53e077f6109cc8/superset/assets/visualizations/markup.js#L28
Unfortunately, srcdoc is not support in the latest IE: https://www.w3schools.com/TAgs/att_iframe_srcdoc.asp
Is it possible to replace the contents of the iframe using jQuery instead of embedding it in the srcdoc attribute? Something similar to the following? https://stackoverflow.com/questions/13214419/alternatives-to-iframe-srcdoc
@jaylindquist or you can open a PR adding srcdoc polyfill https://github.com/jugglinmike/srcdoc-polyfill
@xrmx PR #3702 Opened