Skip to content

Plotly modebar buttons malformed #703

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

Closed
brjewell opened this issue Jun 29, 2016 · 3 comments
Closed

Plotly modebar buttons malformed #703

brjewell opened this issue Jun 29, 2016 · 3 comments

Comments

@brjewell
Copy link

Hi,

I have a web application where I open a new window using JS,

window.open (myUrl, '_blank');

to display a plotly graph.

When the graph is rendered, the modebar buttons are skewed (the buttons are large and are rendered across the entire page), as if the CSS for the modebar is not being read.

Note that this is happening in Google Chrome, and when I press F12 to display the Chrome developer Tools, and then hit F12 a second time, the modebar buttons are shown correctly.

Since F12 in Google Chrome will redraw the page, the workaround for this issue seems to be to programmatically force a redraw such that the modebar CSS takes over. However, I have not been able to get this to work.

Note that the action of hitting F12 twice will always fix the issue and the modebar buttons are then rendered correctly.

Any ideas of how to get around this problem? I think it is likely related to the fact that I am displaying the plotly graph in a new window.

I should also mention this problem does not occur with FireFox.

I have enclosed a screenshot.

Thank you for your help.

plotly-buttons-screenshot.docx

@etpinard
Copy link
Contributor

Thanks for the report

Here's the screenshot in question:

image

This may be related to #702

@etpinard etpinard added the bug something broken label Jun 29, 2016
@etpinard
Copy link
Contributor

I wonder if this issue has to something to do with the way we inject style sheets into the DOM using js with Lib.addStyleRule.

@etpinard etpinard added type: duplicate and removed bug something broken labels Aug 5, 2016
@etpinard
Copy link
Contributor

etpinard commented Aug 5, 2016

merged with #702

@etpinard etpinard closed this as completed Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants