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

Latest release leads to infinite loops when calling restyle on plotly_hover #1446

Closed
jayfresh opened this issue Mar 6, 2017 · 6 comments · Fixed by #1448
Closed

Latest release leads to infinite loops when calling restyle on plotly_hover #1446

jayfresh opened this issue Mar 6, 2017 · 6 comments · Fixed by #1448
Assignees

Comments

@jayfresh
Copy link

jayfresh commented Mar 6, 2017

Since the latest release, using the hover and unhover events seems to throw a lot of JavaScript errors, ultimately locking up the browser. The easiest way to see this is on the hover event example on the Plotly docs: https://plot.ly/javascript/plotlyjs-events/#hover-event with accompanying codepen here: http://codepen.io/plotly/pen/xgxbrj.

I've tested that this doesn't happen locally for v1.23.1 (and there aren't any "hover" changes in v1.23.2 so I expect that would work, but https://cdn.plot.ly/plotly-1.23.2.min.js is not available).

@etpinard
Copy link
Contributor

etpinard commented Mar 6, 2017

Thanks for the report.

I suspect #1304 and/or #1376 could have broken your example.

@etpinard etpinard changed the title Latest release breaks the hover event Latest release leads to infinite loops when calling restyle on plotly_hover Mar 6, 2017
@etpinard
Copy link
Contributor

etpinard commented Mar 6, 2017

Looks like indeed #1304 is the culprit. cc @rreusser @alexcjohnson

@jayfresh We're currently working on a fix that will be part of v1.24.1

In the meantime adding

  var gd = document.getElementById('myDiv')
  gd._hoverdata = undefined

to the 'plotly_unhover' event handler as in http://codepen.io/etpinard/pen/dvpKLw makes things work again.

@jayfresh
Copy link
Author

jayfresh commented Mar 9, 2017

👍

@jayfresh
Copy link
Author

jayfresh commented Mar 9, 2017

Ah, there's still a problem on my app using v1.24.1, but I'm not sure where that's coming from exactly. Trying to replicate on a codepen.

@dictaartisan
Copy link

dictaartisan commented May 1, 2017

I see what is probably the same problem (stack overflow, chrome hanging) when drawing/removing an annotation on hover and unhover events

Here's a codepen (shamelessly copying etpinard's code)

http://codepen.io/dictaartisan/pen/XRRYwe

Hover in and out of the points often enough and browser will hang - seems to recover after a while in this case but on another more complex plot I have to kill the browser

@Linerd
Copy link

Linerd commented Aug 16, 2017

Same here, on the latest version. Trying to restyle a scatter 3D plot upon hovering and infinite amount of hover events are triggered until maximum stack call is reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants