Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[2.7] Lost responsive after destroy recreate #4737
Comments
This comment has been minimized.
This comment has been minimized.
|
Duplicates #4630 but haven't been able to reproduce it. @frlinw can you share your project and/or build a jsfiddle that show this issue? |
This comment has been minimized.
This comment has been minimized.
|
@simonbrunel your jsfiddle reproduce the issue perfectly |
This comment has been minimized.
This comment has been minimized.
|
The fiddle works for me in Firefox 55. What browser and version are you using to get this issue? any console errors / warnings? |
This comment has been minimized.
This comment has been minimized.
|
You are right, it's ok on firefox. I'm using Chrome lastest (60) |
This comment has been minimized.
This comment has been minimized.
|
I can reproduce it using Chrome, not sure what workaround you can use right now. I guess that you have good reason to re-create the chart everytime instead of calling |
This comment has been minimized.
This comment has been minimized.
|
I already switched to chart.update() during the night so the issue is solved for me. Take your time to fix it ;) |
This comment has been minimized.
This comment has been minimized.
|
@simonbrunel @frlinw I debugged through this a bit. Here's what I've got so far: If I add a breakpoint to line 258 of In the case where no breakpoint is added, the callbacks on line 261 and 269 are never called. Interestingly if I add a breakpoint in removeResizeListener and step through it then it also works as expected. My hunch is that something gets queued up to remove the old node and then somehow either prevents the new node from being added, or removes it immediately after it is added. |
This comment has been minimized.
This comment has been minimized.
|
Similar issue here. 2.7 is no more responsive. |
This comment has been minimized.
This comment has been minimized.
|
@etimberg just for curiosity, what if you put these lines in a setTimeout( ... , 0) ? |
This comment has been minimized.
This comment has been minimized.
|
On chart destroy, the Could be solved by:
I will investigate the second solution first. @frlinw I think the |
This comment has been minimized.
This comment has been minimized.
|
@daniele-orlando @frlinw can you guys please verify that #4774 correctly fix this issue? |
This comment has been minimized.
This comment has been minimized.
Same for me. |
This comment has been minimized.
This comment has been minimized.
|
I had a very similar issue with chrome not being responsive while it was in firefox - I thought that I had fixed it by moving to update() but it the issue returned. Long story short, #4774 fixes the issue for me. |


If some options have changed, I destroy the chart then create a new one.
Since 2.7, the div which handle resize detection is removed but is not re-created.
No problem with the iframe in 2.6