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

Scrolling on the legend will cause the parent to scroll #7066

Open
Lexachoc opened this issue Jul 26, 2024 · 0 comments · May be fixed by #7067
Open

Scrolling on the legend will cause the parent to scroll #7066

Lexachoc opened this issue Jul 26, 2024 · 0 comments · May be fixed by #7067
Labels
bug something broken P2 needed for current cycle sev-3 annoyance with workaround

Comments

@Lexachoc
Copy link
Contributor

Lexachoc commented Jul 26, 2024

When I scroll in the legend, the whole page scrolls as long as the legend is at the top or bottom. This seems to be normal, but the problem is that it scrolls so fast that it quickly reaches the top or bottom and scrolls the whole page.

I found out it was a bug in the source code makes the scroll so fast, which I checked and fixed with PR #7067 (I'm not sure if my fix is correct, but the scrolling behavior got much better.

The current legend scroll behavior with Plotly v2.34.0:
it reaches the bottom or top quickly and make the page scroll!
recording

Note that I'm using Windows 10 with lines to scroll set to 10 each time, but I think 10 isn't that high:
image

After my fix in the source code, scrolling becomes normal with lines to scroll set to 10:
recording

And even normal if the value for the lines to be scrolled is set to 1:
image

recording

P.S. In the PR #7067, I would prefer the page to stop scrolling at the top or bottom of the legend as well, since the original behavior scrolls the page immediately when it reaches the top or bottom, as opposed to the native browser behavior where you have to scroll again to scroll the parent.

P.S. The touch event also seems to have a problem, when touch dragging the legend the whole page moves.
But in the PR #7067 for solving this issue, I only focus on the wheel scroll event.

@Lexachoc Lexachoc linked a pull request Jul 26, 2024 that will close this issue
@gvwilson gvwilson assigned gvwilson and unassigned gvwilson Jul 26, 2024
@gvwilson gvwilson changed the title [BUG] Scrolling on the legend will cause the parent to scroll Scrolling on the legend will cause the parent to scroll Aug 8, 2024
@gvwilson gvwilson added bug something broken sev-3 annoyance with workaround P2 needed for current cycle labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P2 needed for current cycle sev-3 annoyance with workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants