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

Plotly chart conflict with touchstart / touchmove event to scroll smartphone screen #6902

Closed
HarrysLapTimer opened this issue Feb 18, 2024 · 1 comment

Comments

@HarrysLapTimer
Copy link

Thanks for developing this great piece of software!

I use Plotly to create charts as part of an HTML page. The speciality is, that I use an "almost static" configuration looking like this:

{
    staticPlot: false, 
    displayModeBar: false,
    scrollZoom: false,
    editable: false
}

As a result, the chart's behavior is static / display only with the exception I can tap a marker and get a hover displayed showing data details. The hovers are configured using hovertemplate in various traces.

That's all fine and working as expected.

The problem is when using a smartphone (iOS browser). When using the usually drag gesture (touchdown, touchmove...) to scroll the whole browser window, and start the drag operation in the chart - the browser doesn't scroll. So while only the touchdown, touchup gesture should be handled (to display a hover), the chart catches the drag gesture accidentally.

Once I use

{
    staticPlot: true
}

as configuration, the events are propagated properly but I do not get the hovers either.

@HarrysLapTimer
Copy link
Author

Not sure it is a workaround, or designed to manage that scenario:

Setting layout.dragmode to false fixes the problem.

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

1 participant