Re: Scroll focus when reaching the end of a scrollable element

On Tue, Sep 23, 2014 at 11:27 AM, Tab Atkins Jr. <jackalmage@gmail.com>
wrote:

> [Rick, please don't top-post http://wiki.csswg.org/tools/www-style ]
>

Sorry, thanks you for the link!

On Tue, Sep 23, 2014 at 7:21 AM, Rick Byers <rbyers@chromium.org> wrote:
> > On Sat, Sep 20, 2014 at 9:05 PM, Eric Andrew Lewis
> > <eric.andrew.lewis@gmail.com> wrote:
> >>
> >> Hi friends,
> >>
> >> I'd like to chat about scroll focus when reaching the end of a
> scrollable
> >> element.
> >>
> >> In most modern browsers, when you scroll to the end of a scrollable
> >> element (i.e. overflow-y: scroll applied), scroll focus bubbles up to
> the
> >> next scrollable element. Here's a quick codepen example of that, and a
> video
> >> example.
> >>
> >> This makes moving through the content of a scrollable element a touchy
> >> user experience: if you try to quickly scroll through it, you run the
> risk
> >> of losing your place in the page.
> >>
> >> I would love control over this in CSS, so that I can explicitly declare
> >> that a container should own scroll focus when it is being interacted
> with by
> >> mouseover or touch swiping.
> >>
> >> There are a number of Javascript libraries that let you create
> scrollable
> >> elements which have built-in support with this alternate behavior - see
> >> Control.scrollBar and jQuery Custom Scrollbar. These libraries also
> >> implement custom scrollbars, but that's not a part of this discussion.
> >
> > I agree this is a behavior web developers should be able to customize.
> > Another scenario it comes up in is when you have UI that is logically a
> > pop-up window (perhaps position:fixed).  Scrolling inside of it shouldn't
> > attempt to scroll any elements in it's containing block chain (I've seen
> > many websites in Chrome where the geyed-out page in the background
> scrolls
> > in such a case).
> >
> > IE has -ms-scroll-chaining for precisely this problem.  Does that do
> > everything you'd want?
> >
> > On the blink team we're mainly interested in lower level primitives
> (such as
> > the beforescore event we just proposed here) that enable a much richer
> set
> > of customization.  I'd personally still support standardizing something
> like
> > scroll-chaining if we also had the low-level primitives that "explain"
> it.
>
> Yes, I think scroll-chaining does exactly what's requested, and I'm
> happy enough with its name and syntax that I'd be fine adopting it
> directly.
>

Great.  Jacob, I think we talked about scroll-chaining at one point as
being on your list to eventually try to standardize and unprefix in IE.
Any objection?

Received on Tuesday, 23 September 2014 16:41:01 UTC