Closed Bug 1594345 Opened 5 years ago Closed 3 years ago

Close the Wikipedia's Image Viewer does jump page to top

Categories

(Web Compatibility :: Site Reports, defect, P3)

Tracking

(firefox-esr68 unaffected, firefox-esr78 wontfix, firefox70- wontfix, firefox71 wontfix, firefox72- wontfix, firefox73 wontfix, firefox74 wontfix, firefox81 unaffected, firefox82 unaffected, firefox88 wontfix)

RESOLVED FIXED
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- wontfix
firefox70 - wontfix
firefox71 --- wontfix
firefox72 - wontfix
firefox73 --- wontfix
firefox74 --- wontfix
firefox81 --- unaffected
firefox82 --- unaffected
firefox88 --- wontfix

People

(Reporter: breakmt, Unassigned)

References

(Regression, )

Details

(Keywords: regression, site-compat, webcompat:site-wait)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

  1. Open web page with pictures which you can open in same page (example, wikipedia https://en.wikipedia.org/wiki/Musical_notation),
  2. Scroll to the middle of the page,
  3. Open picture,
  4. Close picture

Actual results:

Focus jumps to page's top

Expected results:

Same place as step 2

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Summary: Closing image does jump page to top → Close Wikipedia's Image Viewer does jump page to top
Has Regression Range: --- → yes
Component: Untriaged → DOM: Navigation
Keywords: regression
Product: Firefox → Core
Regressed by: 1563587
Summary: Close Wikipedia's Image Viewer does jump page to top → Close the Wikipedia's Image Viewer does jump page to top

Updated the site compatibility note to mention this bug.

Keywords: site-compat

Recent regression, too late to fix in 70 but we could still take a patch in 72.

Olli can you take a look? Thanks!

Flags: needinfo?(bugs)

Neha, could you help us prioritizing this bug and finding an owner of it needs a fix in the 71/72 time frame ? Thanks

Flags: needinfo?(nkochar)

FWIW, it isn't clear that this is a Gecko bug. It could very well be that the website has some Firefox specific code, and now that we behave like other browsers, the behavior is broken. But I'm planning to look at this this week.

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

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

Marking as wontfix for 71 as this seems to be a webcompat bug. Mike, do we have contacts at Wikipedia or a bug tracker where we could report this issue?

Flags: needinfo?(miket)

Nevermind, I see that a patch is in the pipe on the 'see also' link.

Flags: needinfo?(miket)

(In reply to Pascal Chevrel:pascalc from comment #12)

Nevermind, I see that a patch is in the pipe on the 'see also' link.

I don't see a patch there - could you provide an explicit link?

Removing my NI as this is a tech evangelism bug.

Flags: needinfo?(nkochar)

So looks like Wikipedia folks are trying to fix the issue by adding a 50ms delay to the setTimeout() hack mentioned in Comment 7. Not the best solution but a minimum effort.

Moving to a proper component given a site-specific issue.

Component: DOM: Navigation → Desktop
Product: Core → Web Compatibility
Version: 70 Branch → unspecified
Priority: -- → P3

(In reply to Kohei Yoshino [:kohei] from comment #15)

So looks like Wikipedia folks are trying to fix the issue by adding a 50ms delay to the setTimeout() hack mentioned in Comment 7. Not the best solution but a minimum effort.

20 days later, still neither a Wikipedia fix nor FF fix? :/ (I'm running FF Dev edition, still affected). What means "fix-optional" ? Couldn't find a description on wiki.mozilla.

Flags: needinfo?(lhenry)

Hi Daniel. It looks like Wikipedia may have a fix coming (see https://phabricator.wikimedia.org/T229484; a patch is waiting for review).

I marked this bug "fix-optional" for Firefox 72 and 73, because the fix is coming from Wikipedia, not in Firefox so there is no work to be done in this bug by our developers. I'm keeping this bug open, though, so we have a chance to follow up to make sure the fix works. I'll try commenting in the Wikimedia issue.

Flags: needinfo?(lhenry)

Somehow I can no longer reproduce the issue, though the patch is still under development by Wikimedia folks.

Hi,

I've re-tested this on the latest nightly 82.0a1 (2020-08-27) and Firefox 81.0b3, and both versions are unaffected. I don't know if I should close it, I'll leave the update FYI.

Regards,

wikipedia seems to have been fixed. (This was a site issue)

Flags: needinfo?(bugs)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
See Also: → 1681977

Given bug 1681977, I guess this still happens every now and then. And https://phabricator.wikimedia.org/T229484 hasn't been fixed.

Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Severity: normal → S3
Blocks: 1681977

As detailed in https://bugzilla.mozilla.org/show_bug.cgi?id=1681977#c6 this issue is caused by MediaWiki indirectly setting scrollPos to zero before the browser saves the scroll position, but keeps history.scrollRestoration enabled, which in turn restores the 0 scrollPos. MediaWiki also restores the correct scrollPos, but the order of the two is undefined behavior, resulting in this race condition.
A solution was ready by Feb 2020, but never reviewed. The issue is within MediaWiki, Mozilla cannot do anything to fix it.

OK and this has been fixed on wikimedia side!
https://phabricator.wikimedia.org/T229484#7265596

Status: REOPENED → RESOLVED
Closed: 4 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.