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

Hover label bBox isn't right on this page in FF55 #2003

Closed
etpinard opened this issue Sep 13, 2017 · 6 comments
Closed

Hover label bBox isn't right on this page in FF55 #2003

etpinard opened this issue Sep 13, 2017 · 6 comments
Labels
bug something broken

Comments

@etpinard
Copy link
Contributor

etpinard commented Sep 13, 2017

See graphDiv2 heatmap in https://codepen.io/anon/pen/xXxOqG

First reported in https://community.plot.ly/t/firefox-only-hovertext-bounding-box-in-heatmap-chart-is-not-always-correct/5737

Works fine in Chrome 61

@etpinard etpinard added the bug something broken label Sep 13, 2017
@alexcjohnson
Copy link
Collaborator

Wow, this is the weirdest one I've seen in a while. Simply calling Plotly.newPlot twice (with the same data into the same <div>) is enough to trigger this bug. Seems specific to heatmap, contour, and the 2d histogram types.

Sadly the FF debugger still can't seem to load our source files and nearly crashes my whole machine if I try...

Somehow it seems that the colorbar title is necessary to trigger the issue. Minimal example:

var data1 = [{
	  type: "heatmap",
	  z: [[10, 32], [55, null]],
	  colorbar: {title: "X"}
}];
Plotly.newPlot(graphDiv1, data1);
Plotly.newPlot(graphDiv1, data1);

Take out the title and it works correctly.

@rreusser
Copy link
Contributor

rreusser commented Sep 13, 2017

Ouch. I can reproduce this. But if I open the firefox inspector and try to see what's going on with the SVG DOM, it suddenly appears correct. And if I close the inspector, it remains correct. That feels like the sort of thing you see when there's some rendering optimization that's not working quite right. But I'm not sure because it's hard to debug. 😞

@alexcjohnson
Copy link
Collaborator

I'm tempted to just get rid of all the getBoundingClientRect calls in fx/hover (use Drawing.bBox where necessary) and hope it fixes #888, #1902, and this.

@alexcjohnson
Copy link
Collaborator

FYI even unrelated traces have their hover labels messed up by the colorbar title.

var data1 = [{
	  type: "heatmap",
	  z: [[10, 32], [55, null]],
	  colorbar: {title: ""}
}, {y:[0, 1]}]; // that's a scatter trace

Gives me even more reason to think ^^ would fix it.

@alexcjohnson
Copy link
Collaborator

I can't reproduce this bug anymore, even in FF55. Can we close it? Of course the goal of removing getBoundingClientRect still stands, but the other issues should serve as impetus for that.

@etpinard
Copy link
Contributor Author

etpinard commented Jul 4, 2018

Closing. Can't reproduce in FF60

@etpinard etpinard closed this as completed Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

3 participants