Closed eXeC64 closed 8 years ago
Thanks for the PR! I wasn't aware of this. One question though - if there is more than one plotly component open, and one closes, is the other adversely affected by removing this node?
BTW Nice surname :D
Removing the element doesn't appear to adversely affect anything. On my end I've actually moved the removal to be immediately after every draw call, so that the element is removed immediately, and the plots themselves sill work fine.
I've no idea why Plotly inserts this stuff, it seems rather unnecessary.
Re surname: Yes :) Although the trouble I (and presumably you) have with people spelling it as Jeffrey, Jeffries, Geoffreys, etc.
Seems it is used for testing some browser behaviour, might be worth asking plotlyjs to clean up after itself, but for now I'll just merge this.
BTW - my main project just suffered weird layout issues (in chrome only) due to this cruft. It would have taken ages to debug if you hadn't already pointed it out, so thanks!
I've submitted an upstream issue for this: https://github.com/plotly/plotly.js/issues/513
Good call. I didn't think of that.
Plotly creates some additional cruft in the DOM when rendering its graphs. When the graph has been unmounted, the cruft remains and magically interferes with the rest of my layout, specifically the
<AppBar>
component from material-ui.This pull request fixes that issue by removing the cruft automatically when unmounting graphs.