Page MenuHomePhabricator

Map interaction is disabled on the first click after scroll
Closed, ResolvedPublic

Description

The very first click and drag on the map is not doing anything after the page has been scrolled. The map becomes interactive only with the second click. If i scroll the page up or down, the map locks up again until the second click.

Event Timeline

Yurik created this task.Sep 9 2016, 2:20 AM
Restricted Application added a project: Discovery. · View Herald TranscriptSep 9 2016, 2:20 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Yurik renamed this task from Map interaction is disabled on the first click to Map interaction is disabled on the first click after scroll.Sep 9 2016, 2:22 AM
Yurik updated the task description. (Show Details)
Yurik moved this task from Unsorted to UI tasks on the Maps (Kartographer) board.Sep 9 2016, 2:54 AM

This is due to the leaflet sleep plugin we use (to avoid the map to catch the mouse while scrolling).
The map is set to wake 750ms after you mouseover. So if you click within this 750ms timeframe, nothing happens.

We can try to reduce it and see if it works better, while not impacting scrolling.

Yurik added a comment.Sep 9 2016, 7:45 AM

thanks, i didn't realize it was a delay rather than first click... I'm not sure what the most optimal number here would be... we could try 500-600 i guess.

It's actually 1s. Let's do some testing with 500ms.

Change 309546 had a related patch set uploaded (by JGirault):
Wake the map after 500ms instead of 1s

https://gerrit.wikimedia.org/r/309546

JGirault claimed this task.Sep 9 2016, 10:31 AM
JGirault moved this task from Backlog to Stalled/Waiting on the Maps-Sprint board.
JGirault moved this task from Stalled/Waiting to Needs review on the Maps-Sprint board.

Change 309546 merged by jenkins-bot:
Wake the map after 500ms instead of 1s

https://gerrit.wikimedia.org/r/309546

JGirault closed this task as Resolved.Sep 14 2016, 3:12 PM