-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
plots in plotly.js tutorial docs not displaying in Internet Explorer 11 #3186
Comments
Can you try opening https://codepen.io/ and any other example codepen in IE11 to help us out? Thanks. |
@etpinard Current release https://github.com/plotly/plotly.js/releases/tag/v1.42.0 doesn't work for me in IE 11 anymore. Something about |
Yeah I get this message when opening https://codepen.io/ like I doubted it could be related to codepen and not plotly but maybe I am wrong. But not the pen view: |
IE 11 doesn't support |
Providing this polyfill before triggering Plotly works: https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove#Polyfill |
@Braintelligence which example are you looking at? |
This seems to be the offender: Line 716 in 0124828
|
@etpinard I hope alex hit the spot. Sadly I'm not looking at any example, I'm looking at a website in the work that is still under NDA 🙈. |
I also figured that some plots are displaying. For instance, these two examples https://plot.ly/javascript/line-charts/#connect-gaps-between-data and https://plot.ly/javascript/line-charts/#labelling-lines-with-annotations are displaying but not the rest of the plots in the doc. The only common difference I can find is these two plots has |
(BTW thanks @Braintelligence for tracking down the broken feature) (function (arr) {
arr.forEach(function (item) {
Object.defineProperty(item, 'remove', {
configurable: true,
enumerable: true,
writable: true,
value: function remove() {
console.trace(this);
if (this.parentNode !== null)
this.parentNode.removeChild(this);
}
});
});
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]); Perhaps we can build that into our tests, with a |
@alexcjohnson Good catch. I combined it with a bowser.msie check to not call the polyfill for anything but IE. |
@Braintelligence my comment was just for our own debugging. Hopefully we'll have a patch release out shortly that fixes this so you won't need to polyfill at all, but as written in that MDN link it's great even without an IE check, since it'll only fill if the method is initially absent. |
@alexcjohnson Yeah, your comment still makes sense for me if you check that you use IE 11 beforehand 😸. The if-block was for skipping every element that has .remove() naturally, right? So if I just check once if I'm looking at IE 11 or not I can skip the whole iteration beforehand for everything but IE 11. 😼 |
@Braintelligence Can you try the latest patched plotly.js (https://17351-45646037-gh.circle-artifacts.com/0/plotly.min.js) built from PR #3187 and confirm over there that it works! |
@antoinerg Sorry I'm off work now. Will try tomorrow :( |
@antoinerg I can confirm that your linked plotly.min.js works without providing the polyfill yourself. |
This issue is specific only to the plots in
CodePen
.The text was updated successfully, but these errors were encountered: