W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2008

[whatwg] scrollIntoView feedback

From: Peter Kasting <pkasting@google.com>
Date: Thu, 31 Jul 2008 04:09:26 -0700
Message-ID: <d62cf1d10807310409p2dd006c3lcc60b278ff492fc1@mail.gmail.com>
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
> such
> >    that the element is centered* in the viewport (within the scrolling
> limits
> >    -- if the element is at the bottom of the page, it clearly can't be
> scrolled
> >    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"
would suffice.

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.
http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#scrollintoviewstill
seems to read a lot like I remember it...

PK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080731/30418024/attachment.htm>
Received on Thursday, 31 July 2008 04:09:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC