[whatwg] scrollIntoView feedback
pkasting at google.com
Thu Jul 31 04:09:26 PDT 2008
On Thu, Jul 31, 2008 at 2:31 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Wed, 30 Apr 2008, Peter Kasting wrote:
> > - Otherwise, if the element is not larger than the viewport, scroll
> > that the element is centered* in the viewport (within the scrolling
> > -- if the element is at the bottom of the page, it clearly can't be
> > up to the middle of the viewport).
> As far as I can tell, as defined, browsers would be allowed to do all this
> for scrollIntoView().
I don't read the spec that way. The phrase "with the bottom of the element
aligned with the bottom of the viewport" seems to rule out the possibility
of other alignments such as suggested above.
If you wish browser vendors to have the freedom to experiment here, perhaps
a vague sentence such as "the user agent should scroll the element as
necessary such that as much of it as possible is visible in the viewport"
My impression was that Firefox 3 changed scrollIntoView behavior precisely
to comply with the detailed description currently in the spec.
It is effectively optional now. Horizontal scrolling is also required.
Now I'm wondering whether I'm looking at the wrong version of the spec,
since I don't see any of that.
seems to read a lot like I remember it...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg