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

On Thu, Aug 9, 2012 at 2:02 PM, Sylvain Galineau <sylvaing@microsoft.com>wrote:

> [Robert O'Callahan:]
>
> >That obviously would break if scrollLeft sometimes points in different
> directions.
> Why? Code that walks up the scrollLeft chain already is broken in RTL
> contexts today
> since browsers do different things.


True, that code is already broken for RTL on some browsers, but we might be
able to make it correct by changing the behavior of those browsers,
depending on how that code is used.

As for those libraries that use pageXOffset they
> would be presumably be unaffected by a change in scrollLeft?
>

Ah, I had assumed only IE supports pageXOffset, but indeed I'm incorrect,
and all major browsers support it. It's even in CSSOM View!

So then it's true we can change scrollLeft without breaking these
frameworks. That's good. I'm still a bit scared of making this change but
we can give it a go. I'd still like to hear from Webkit/Opera.

If we do make scrollLeft and pageXOffset different for RTL, we'll need to
decide which one scrollX maps to. I suppose making it equal scrollLeft is
most logical. We'll also have to define scrollTo() for RTL; making it
follow scrollLeft/scrollTop is what IE does, which seems reasonable.

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 02:27:41 UTC