css `scroll-behavior: smooth` doesn't work when using back/forward button

RESOLVED DUPLICATE of bug 391664

Status

()

Core
Untriaged
RESOLVED DUPLICATE of bug 391664
2 years ago
2 years ago

People

(Reporter: Keith, Unassigned)

Tracking

({reproducible, testcase})

Trunk
reproducible, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3

Steps to reproduce:



1. Visit http://keithclark.co.uk/temp/pure-css-parallax-nav-demo/
2. Click 'Slide 4', page should smooth scroll to slide 4
2. Click 'Slide 2', page should smooth scroll to slide 2
3. Click browser Back, page should smooth scroll to slide 4
4. Click browser Forward, page should smooth scroll to slide 2


Actual results:

Using the back/forward buttons does not trigger a scroll in this example


Expected results:

Page should have smooth scrolled to slides 4 and 2
Flags: needinfo?(kgilbert)
I have reproduced this using these instructions.  IMHO, this is a bug - users would expect the scrolling to be consistent when using the back/forward buttons to navigate between different hash URI's of the same page.
Flags: needinfo?(kgilbert)

Comment 2

2 years ago
Thanks for the report! I can reproduce on OS X nightly.

This doesn't seem to be limited to `scroll-behavior: smooth`: if I remove that, the page still doesn't scroll on back/forward.

Any chance you could minimize the testcase even further, removing everything not required to reproduce the bug?
Component: Untriaged → Untriaged
Keywords: reproducible, testcase, testcase-wanted
Product: Firefox → Core
Version: 38 Branch → Trunk

Comment 3

2 years ago
I've reduced the test case further: http://codepen.io/keithclark/pen/mJoxbo

It seems the problem occurs when an anchor is nested inside an element with the overflow property set.

In the demo above, comment out the `overflow` properties on lines 4 and 10 of the CSS to see the desired result.

Comment 4

2 years ago
Thanks for the testcase! Looks like this is a known bug...
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Keywords: testcase-wanted
Resolution: --- → DUPLICATE
Duplicate of bug: 391664
You need to log in before you can comment on or make changes to this bug.