Scrolling on the legend will cause the parent to scroll
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 18.3k
- Fork
- 2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách xem xét PR #7067 và cách xử lý legend wheel-scroll trong Plotly v2.34.0. Tái hiện sự cố với các cài đặt con lăn Windows đã mô tả, sau đó so sánh hành vi của con lăn tại các ranh giới của chú giải. Được xem là hoàn tất khi việc cuộn chú giải không còn khiến trang di chuyển ngoài dự kiến; hành vi cảm ứng được xem xét riêng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100