Page MenuHomePhabricator

After closing, browser sometimes scrolls to the top of the page in Firefox 70
Open, Needs TriagePublic

Description

Steps to reproduce

  1. Go to https://test.wikipedia.org/wiki/Ji%C5%99%C3%AD_z_Pod%C4%9Bbrad or https://cs.wikipedia.org/wiki/Ji%C5%99%C3%AD_z_Pod%C4%9Bbrad
  2. Scroll down and open an image with mediaviewer enabled
  3. Close mediaviewer (reproduced only with esc pressed, but that might be just a coincidence)
  4. If browser didn't scroll up, try again

Details

This appears to always happen in Firefox >= 70 and sometimes happen in Chrome. These may be two different problems, but may have the same solution.

Cause

https://www.fxsitecompat.dev/en-CA/docs/2019/history-navigation-methods-are-now-asynchronous/

Screencast

see https://martin.urbanec.cz/files/screencasts/T229484.webm for screencast

Details

Related Gerrit Patches:
mediawiki/extensions/MultimediaViewer : masterFix failure to restore the scroll position on close in Firefox

Event Timeline

Urbanecm created this task.Jul 31 2019, 9:08 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptJul 31 2019, 9:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm updated the task description. (Show Details)Jul 31 2019, 9:13 PM
Dvorapa added a subscriber: Dvorapa.Aug 6 2019, 2:28 PM

Since ~ 1 week this happens for every image view and is very annoying. Maybe it is related to the new releases Firefox 70.0? It does not happen in Chrome 77.

Aklapper renamed this task from After closing, browser sometimes scrolls to the top of the page to After closing, browser sometimes scrolls to the top of the page in Firefox 70.Oct 26 2019, 11:16 AM

This is driving me bonkers... for me it seems to happen on Firefox, but not Chrome

Aklapper edited projects, added Upstream; removed Multimedia.Mon, Nov 18, 12:26 PM
Aklapper moved this task from Backlog to Reported Upstream on the Upstream board.

Quoting https://bugzilla.mozilla.org/show_bug.cgi?id=1594345#c7 :

This is a tech evangelism bug. A quick research finds:

Quoting https://bugzilla.mozilla.org/show_bug.cgi?id=1594345#c8 :

Workaround:
user_pref("dom.window.history.async", false);

dbarratt updated the task description. (Show Details)Mon, Nov 18, 2:19 PM
dbarratt updated the task description. (Show Details)Mon, Nov 18, 2:24 PM
dbarratt updated the task description. (Show Details)Mon, Nov 18, 2:30 PM

(Reading web team does not maintain the MediaViewer extension)

Change 553523 had a related patch set uploaded (by Aklapper; owner: Tim Starling):
[mediawiki/extensions/MultimediaViewer@master] Fix failure to restore the scroll position on close in Firefox

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

Esanders removed a subscriber: Esanders.Mon, Dec 2, 10:51 AM