-
Notifications
You must be signed in to change notification settings - Fork 11.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
[2.7] Lost responsive after destroy recreate #4737
Comments
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? |
@simonbrunel your jsfiddle reproduce the issue perfectly |
The fiddle works for me in Firefox 55. What browser and version are you using to get this issue? any console errors / warnings? |
You are right, it's ok on firefox. I'm using Chrome lastest (60) |
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 |
I already switched to chart.update() during the night so the issue is solved for me. Take your time to fix it ;) |
@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. |
Similar issue here. 2.7 is no more responsive. |
@etimberg just for curiosity, what if you put these lines in a setTimeout( ... , 0) ? |
On chart destroy, the Could be solved by:
I will investigate the second solution first. @frlinw I think the |
@daniele-orlando @frlinw can you guys please verify that #4774 correctly fix this issue? |
Same for me. |
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
The text was updated successfully, but these errors were encountered: