Closed Bug 1561248 Opened 5 years ago Closed 2 years ago

When returning to previous page, page is scrolled to top

Categories

(Core :: DOM: Navigation, defect, P3)

69 Branch
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox69 --- affected

People

(Reporter: mbrodesser-Igalia, Unassigned)

Details

STR:

  1. Open https://searchfox.org/mozilla-central/source/dom/base/TimeoutHandler.cpp#133-136
  2. Click on some link.
  3. Press "Alt" and "<-" to return to previous page.

Expected:
page is scrolled to same line as before.

Actual:
page is scrolled to the top.

Happens with current Nighty. Doesn't happen with FF 67.

WFM on latest nightly on Mac (2019-06-24).

Component: Bookmarks & History → Untriaged

Retried with latest Nightly, still doesn't work. Using Ubuntu 18.04.

Component: Untriaged → Document Navigation
Product: Firefox → Core

works for me on Mac using latest nightly 70.0a1 (2019-08-07) (64-bit).
Nika, do you see this on ubuntu?

Flags: needinfo?(nika)

By default this works for me on my local install as well.

However, I believe I know what the source of the issue is. The issue only reproduces if the URL being navigated back to is not in the bfcache. This can happen if, for example, there is memory pressure at the time.

You can reproduce this more reliably with the following STR:

  1. Open https://searchfox.org/mozilla-central/source/dom/base/TimeoutHandler.cpp#133-136
  2. In the DevTools console, type window.onbeforeunload = () => {}, and press enter
  3. Click on the "HG Web" link
  4. Press "Alt" and "<-" to return to previous page.

The page will incorrectly scroll to the top.

Flags: needinfo?(nika)
Priority: -- → P3

For power-uses of searchfox, this is pretty annoying. On Ubuntu 18.04 this problem always occurs. It does work on Chrome though.

Webcompat Priority: --- → ?
Webcompat Priority: ? → revisit

Same here, FF 92 Windows.
Happens since ~ version 89

On my machine (Linux) this works nowadays with FF 92 and current Nightly.

This seems to work now.

Status: NEW → RESOLVED
Closed: 2 years ago
Webcompat Priority: revisit → ---
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.