W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [cssom-view] value of scrollLeft in RTL situations is completely busted across browsers

From: Gérard Talbot <www-style@gtalbot.org>
Date: Wed, 8 Aug 2012 00:08:19 -0400
Message-ID: <84ed85f69cb073a41e37bc21f164d8db.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: "www-style" <www-style@w3.org>, "Shane Stephens" <shans@google.com>

Le Lun 6 août 2012 7:07, Robert O'Callahan a écrit :
> How should scrollLeft work with RTL? There are some major differences
> across browsers.
> http://people.mozilla.org/~roc/test_rtl_scrollLeft.html
> Try scrolling the elements and clicking in them.
> In Gecko nightly, scrollLeft=0 corresponds to the rightmost scrolled
> position and increases from left to right (so scroll positions are
> negative).


Negative values will definitely confuse people's intuition.

> Opera seems to behave the same way.
> Chrome (22 dev) behaves the same way when scrolling the viewport (for both
> toplevel documents and iframes). Unfortunately scrolling a regular element
> works quite differently: scrollLeft=0 corresponds to the leftmost scroll
> position (but still increases to the right).
> In IE9, scrollLeft=0 corresponds to the rightmost scrolled position but
> scrollLeft increases as you scroll from right to left!

I believe IE9 behavior is the most intuitive.

I agree with Shane Stephen's comment:

> Personally I think IE9 has it right... it seems to match my intuition that
> RTL is a mirror version of LTR, and conserves the ability to scroll to the
> start by setting scrollLeft to 0.


> Any thoughts, before I go ahead? :-)

[CSSOM] Value of scrollLeft in RTL situations (somewhat a beta testpage;
I'll try to continue to work on it)

I adopted one of my old test page. Opera 12.01 and Konqueror 4.9.0 do not
display an horizontal scrollbar (don't know why) when direction is set to
rtl while others (Firefox 14.0.1, Chrome 21.0.1180.57) do. I'm using
Linux KDE 4.9.0,
i686 32bits,
kernel 3.2.0-27-generic-pae,
Qt 4.8.1.

Also notice that Chrome 21.0.1180.57 will have its vertical scrollbar
overlap the first 3 characters of 1st line when in rtl direction: that
seems to be a bug.

+CC: Shane Stephens

CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Wednesday, 8 August 2012 04:08:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:02 UTC