Page MenuHomePhabricator

Going to a link with an anchor scroll to wrong position / viewport in mobile version
Closed, ResolvedPublic

Description

In mobile version of web page when linking to some section on page with anchors, position of page scroll is higher than needed section.

For example,

When I open URL https://en.m.wikivoyage.org/wiki/Kathmandu#See, section "See" on the page is lower than window viewport.

Bug is reproducing on lost of MediaWiki projects:
https://en.m.wikipedia.org/wiki/Kathmandu#Medieval_history
https://en.m.wikivoyage.org/wiki/Kathmandu#See
etc.

Event Timeline

Perekhoden raised the priority of this task from to Normal.
Perekhoden updated the task description. (Show Details)
Perekhoden added a subscriber: Perekhoden.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 7 2015, 1:50 PM
Perekhoden set Security to None.
Florian added a subscriber: Florian.Mar 7 2015, 2:06 PM

This issue can be cause by "Contents" is expanding after page was loaded and scrolled to anchor by browser itself. So after "Contents" is expanded it puts down page content after it.

Aklapper renamed this task from Anchors works not corretly in mobile version of web page to Going to a link with an anchor scroll to wrong position / viewport in mobile version.Mar 9 2015, 12:26 PM

Change 195596 had a related patch set uploaded (by Bmansurov):
Restore anchor position

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

Change 195596 merged by jenkins-bot:
Restore anchor position

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

phuedx closed this task as Resolved.Mar 12 2015, 3:27 PM
phuedx claimed this task.
phuedx removed a project: Patch-For-Review.