Open Bug 1467086 Opened 7 years ago Updated 7 months ago

scroll-behavior: smooth; don't work with anchor "#"

Categories

(Core :: Layout, defect, P3)

53 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: almorca, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170413192749 Steps to reproduce: A have a page with scroll-behavior: smooth; on body element and a bottom link with <a href="#">Go to top</a> Actual results: The transition to top page is not smooth. That solves if a put a id in the head element and a modify the anchor to use new id. Expected results: A smooth transition to top page.
Priority: -- → P3
Severity: normal → S3

scroll-behavior: smooth does not work even on MDN page https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior in 115.0.2 on the Mac

Attached file smooth-scroll.html

Using tab navigation, the scroll-behavior: smooth is not effective. I think this applies more generally to changing the scroll position by focusing an element outside the viewport. Works in Edge, but both browsers exhibit the same quirk – the focused element is sometimes not scrolled into the viewport entirely, horizontally.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: