Scrolling on the legend will cause the parent to scroll
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 18.3k
- Forks
- 2k
- Merge moyen
- 2 j 12 h
- PR mergées (30 j)
- 28
Description
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!
Note that I'm using Windows 10 with lines to scroll set to 10 each time, but I think 10 isn't that high:
After my fix in the source code, scrolling becomes normal with lines to scroll set to 10:
And even normal if the value for the lines to be scrolled is set to 1:
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par examiner PR #7067 et la gestion de legend wheel-scroll dans Plotly v2.34.0. Reproduisez le problème avec les paramètres de la molette Windows décrits, puis comparez le comportement de la molette aux limites de la légende. Le travail est terminé lorsque le défilement de la légende ne déplace plus la page de manière inattendue ; le comportement tactile est considéré séparément.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100