Interoperable Element's scrollLeft and scrollTop in non-default writing modes

Change Chrome's behavior such that when a scrollable element has content overflowing to the left (or to the top) then its horizontal (or vertical) scroll position will be zero at its initial position and negative when scrolled leftward (or upward). This change only affects DOM API Element.scrollLeft(), Element.scrollTop(), Element.scroll(), Element.scrollTo() when the scrollable element has a non-default writing mode that may invert overflow directions (e.g right to left or vertical modes).

Motivation

Update Blink to match the CSSOM View spec’s behavior around absolute values of Element's scrollTop and scrollLeft in non-default writing modes. Make behavior interoperable in RTL or vertical writing modes so that web developers don't need to rely on feature detection techniques.

Documentation

Specification

Working draft or equivalent

Status in Chromium

Blink


Enabled by default (tracking bug) in:

  • Chrome for desktop release 85
  • Chrome for Android release 85
  • Android WebView release 85

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owners

Search tags

scroll offset writing-mode,

Last updated on 2020-10-01