W3C home > Mailing lists > Public > public-i18n-bidi@w3.org > July to September 2012

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

From: Glenn Adams <glenn@skynav.com>
Date: Wed, 8 Aug 2012 23:27:55 -0600
Message-ID: <CACQ=j+edU81vT9-pij7Wak1kaOmw-SzGfB3geaFbR9ME8ksMyA@mail.gmail.com>
To: robert@ocallahan.org
Cc: www-style@gtalbot.org, www-style <www-style@w3.org>, Shane Stephens <shans@google.com>, ML publc-i18n-bidi <public-i18n-bidi@w3.org>
On Wed, Aug 8, 2012 at 3:48 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> jQuery exports a global "scrollLeft" method that is implemented to use
> window.pageXOffset when that's available and documentElement.scrollLeft
> otherwise. In RTL situations, pageXOffset in IE behaves like
> documentElement.scrollLeft in Gecko, Webkit and Opera.
> https://github.com/jquery/jquery/blob/master/src/offset.js#L148
> Mootools and Prototype.js do the same thing:
> https://github.com/darkwing/mootools-core/blob/master/Source/Element/Element.Dimensions.js#L190
> https://github.com/sstephenson/prototype/blob/master/src/prototype/dom/layout.js#L1735
> I also found code that adds up scrollLeft values along a chain of DOM
> ancestors:
> https://github.com/sstephenson/prototype/blob/master/src/prototype/dom/layout.js#L1129
> That obviously would break if scrollLeft sometimes points in different
> directions.
> Based on this data, I propose we adopt the Gecko/Opera behavior for both
> viewport and non-viewport scrolling. (I assume everyone agrees that Webkit
> treating them differently is a bug.)
> If we need a property that always starts at 0 and progresses left in RTL
> situations, I suggest creating a new "scrollHorizontal" property for that.

I agree. scrollLeft should express legacy behavior (to the extent we can
agree on a norm), and a new method can be defined to effectively abstract
writing mode;

"What can be asserted without proof can be dismissed without proof." -
Christopher Hitchens

> Rob
> --
> “You have heard that it was said, ‘Love your neighbor and hate your
> enemy.’ But I tell you, love your enemies and pray for those who persecute
> you, that you may be children of your Father in heaven. ... If you love
> those who love you, what reward will you get? Are not even the tax
> collectors doing that? And if you greet only your own people, what are you
> doing more than others?" [Matthew 5:43-47]
Received on Thursday, 9 August 2012 05:28:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:24:40 UTC