W3C home > Mailing lists > Public > www-style@w3.org > April 2014

Re: [css4-ui] Scrollbar tracking control

From: Alexandre Elias <aelias@chromium.org>
Date: Tue, 15 Apr 2014 17:31:01 -0700
Message-ID: <CADeTeo5DTLCzxmF-W9g00H=WBs2BZm7rBeBJnbFYgh18O3sVWQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Simon Fraser <smfr@me.com>, Mike Lawther <mikelawther@chromium.org>, "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>
I would be interested in hearing the details of what GMail is running into
when trying to do this in Javascript: I assume there is some kind of async
behavior causing problems.  I wonder if we could instead solve those
underlying problems: fixing it at that level may be useful to allow a
variety of other resize-linked behaviors.

In principle, if an event is sent synchronously after resize and Javascript
changes the scroll position before it returns, that could behave the same
way as your proposal.  We shouldn't run into any of the usual difficulties
with off-main-thread scrolling in this area (at least in Chromium/Blink,
and hopefully other browsers), it's just a matter of making things happen
in the right order on the main thread.




On Tue, Apr 15, 2014 at 12:20 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Tue, Apr 15, 2014 at 11:52 AM, Simon Fraser <smfr@me.com> wrote:
> > I’m finding it hard to understand, from Mike’s original email, what the
> intent is here.
> > Is it to preserve the user’s scroll position as content is being added
> dynamically to the document?
> >
> > This is certainly a request we’ve heard from people like Facebook, but
> I’m not sure it’s solvable in CSS.
>
> No, not full tracking.  (Though I came up with suggestions for that in
> the past.)
>
> It's just about "sticking" the scrollbar to a particular edge when
> it's close enough to that edge, even as content is added.  That is, if
> the scroll position is within X distance of the indicated sticky edge,
> any adjustments to the scroll width/height of the element maintain
> your relative distance to the edge.
>
> It's mainly for the common case of chat windows and other log-type
> things (consoles, etc.) that add content at the bottom.  It's
> *remarkably* difficult to make a robust chat window that properly
> sticks the scrollbar to the bottom of the window - I get regular
> complaints from the people implementing Gmail chat windows about this.
>
> ~TJ
>
>
Received on Wednesday, 16 April 2014 00:31:28 UTC

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