Closed
Bug 1182012
Opened 9 years ago
Closed 9 years ago
css `scroll-behavior: smooth` doesn't work when using back/forward button
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
DUPLICATE
of bug 391664
People
(Reporter: keithjclark, Unassigned)
Details
(Keywords: reproducible, testcase)
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
Updated•9 years ago
|
Flags: needinfo?(kgilbert)
Comment 1•9 years ago
|
||
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•9 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?
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•9 years ago
|
||
Thanks for the testcase! Looks like this is a known bug...
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Keywords: testcase-wanted
Resolution: --- → DUPLICATE
Comment 5•7 years ago
|
||
Moving from Core::Untriaged to Core::General https://bugzilla.mozilla.org/show_bug.cgi?id=1407598
Component: Untriaged → General
You need to log in
before you can comment on or make changes to this bug.
Description
•