Last modified: 2014-08-14 13:57:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71467, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69467 - Page scrolls to the top when using the browsers history
Page scrolls to the top when using the browsers history
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
MultimediaViewer (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-13 13:19 UTC by Thiemo Mättig
Modified: 2014-08-14 13:57 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Thiemo Mättig 2014-08-13 13:19:17 UTC
Steps to reproduce:
1. Open a longer article, e.g. https://en.wikipedia.org/wiki/London
2. Click a section in the table of contents, e.g. https://en.wikipedia.org/wiki/London#Air
3. Click an image to open the viewer.
4. Go back in your browsers history (usually Alt+Left).
5. Go forward.
6. Go back again.

Result: The page scrolls to the top.

Expected: Focus should stay on the section.
Comment 1 Tim Starling 2014-08-14 13:51:31 UTC
Confirmed in FF 31. Setting breakpoints in Firebug in debug=true mode shows that if you click "forward" to close MMV and return to the article, MMVB.setupOverlay() is called while the overlay is still present, which wipes bootstrap.savedScroll. Then shortly afterward, MMVB.cleanupOverlay() is executed, but now bootstrap.savedScroll has {0,0} in it.

Here is the stack of the erroneous setupOverlay() call:

MMVB.setupOverlay() mmv.bootstrap.js (line 405)
MMVB.loadViewer() mmv.bootstrap.js (line 86)
MMVB.hash(initialHash=undefined) mmv.bootstrap.js (line 318)
MMVB.setupEventHandlers/<() mmv.bootstrap.js (line 380)
jQuery.event.dispatch(event=Object { originalEvent=Event popstate, type="popstate", timeStamp=1408023881479371, more...}) load.ph...180219Z (line 4641)
jQuery.event.add/elemData.handle(e=popstate ) load.ph...180219Z (line 4309)
Comment 2 Tim Starling 2014-08-14 13:57:41 UTC
That is to say, the stack trace was from step 4 of the similar sequence:

1. open MMV
2. close MMV by clicking the close button
3. back (to MMV)
4. forward (to article)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links