When scrolling a page that contains a map, especially with the mouse wheel, the scrolling should not stop and switch to zoom-in/out mode just because the mouse happened to be over a map. Page scrolling should disable map zoom until some time after the scroll is done.
Description
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Yurik | T127844 Improve Maps UI before production (tracking) | |||
| Resolved | • JGirault | T126659 Scrolling page should not stop and zoom when mouse is over a map |
Event Timeline
Change 279088 had a related patch set uploaded (by JGirault):
Fix the map stopping the scroll and zooming with the open source script leaflet.sleep.js.
I had fixed the issue for a personal project with mousewheel listeners on the page, that will manage a scrolling class to body when scrolling. Then I would have a CSS rule such as:
.scrolling .map {
pointer-events: none;
}I found browsing stackexchange an existing script leaflet.sleep.js that solves the problem specifically for leaflet.js. It seems to do the job pretty well, and it allows a few options (like having an overlay when the map is asleep) that could be interesting to test.
Change 279285 had a related patch set uploaded (by JGirault):
[Alternative] Fix the map stopping the scroll and zooming with the open source script leaflet.sleep.js.
Change 279286 had a related patch set uploaded (by JGirault):
[Alternative] Fix the map capturing the scroll and zooming.
Change 279285 merged by jenkins-bot:
[Alternative] Fix the map stopping the scroll and zooming with the open source script leaflet.sleep.js.
Change 279286 abandoned by JGirault:
[Alternative] Fix the map capturing the scroll and zooming.
Reason:
Closing in favor of https://gerrit.wikimedia.org/r/#/c/279285/
Change 279088 abandoned by JGirault:
Fix the map stopping the scroll and zooming with the open source script leaflet.sleep.js.
Reason:
Closing in favor of https://gerrit.wikimedia.org/r/#/c/279285/