Skip to content
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

chart.destroy() crashes if actively moving cursor over the chart during destruction. Error happens when using line and arearange on a single chart. #20919

Closed
EmigrantDolphin opened this issue Mar 26, 2024 · 4 comments

Comments

@EmigrantDolphin
Copy link

EmigrantDolphin commented Mar 26, 2024

Expected behaviour

Should be able to move my cursor over the chart while it is being destroyed without crashing.

Actual behaviour

image

Live demo with steps to reproduce

I've created a loop for creation and destruction of the chart.
To reproduce the error, move your mouse cursor horizontally over the chart somewhat quickly. (A chart popup with info should be visible.)
It seems it only crashes when line and arearange series are used, but might also be crashing with other series. (It works with line/line, arearange/arearange)

https://jsfiddle.net/f2e03odr/

Product version

Highcharts, highcharts-more

Affected browser(s)

Chrome

@Erbenos
Copy link

Erbenos commented Mar 26, 2024

I can imagine setting pointer-events: none on the chart before attempting to destroy it could workaround your issue.

@hubertkozik
Copy link
Member

Hi @EmigrantDolphin!
Indeed, this is a bug. You should be able to fully destroy the chart even, when any point is hovered. I've prepared a workaround for this issue. If you want to use it in your project before the official fix, all you have to do is copy-paste the IIFE function from the demo below.

Workaround: https://jsfiddle.net/BlackLabel/3mfjkLan/

@EmigrantDolphin
Copy link
Author

Thank you @hubertkozik !
This is a pleasant workaround since it can be encapsulated in the module where the problematic chart resides in. It will be so much easier to undo once the official fix is released :)

@hubertkozik
Copy link
Member

I've found that this issue has the same root cause as this one: #20560 I am closing this one as a duplicate, let's continue in the older GitHub issue.

@hubertkozik hubertkozik closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants