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

InteractivePlot document.querySelectorAll('div') not pointing to the correct div #103

Closed
floriandorre opened this issue Mar 22, 2021 · 1 comment

Comments

@floriandorre
Copy link

Hi,

It seems that the HTML file generated by export_to_html() is not using the right div for the event myPlot.on('plotly_click', function(data)

The plot itself is embed in a div that does not propagate the click to the plotly graph.

Changing the query selector from var myPlot = document.querySelectorAll('div')[0]; to var myPlot = document.querySelectorAll('div')[1]; would fix the issue and the pop up describing the closest solution would work again. But maybe targeting the div by looking at the class name plotly-graph-div would also be a good solution.

Best regards

@ajnebro
Copy link
Contributor

ajnebro commented Mar 23, 2021

Hi.
Thanks for reporting the issue.

Regards,

Antonio

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