W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2012

Re: [whatwg] Should scrollbars move focus?

From: Ojan Vafai <ojan@chromium.org>
Date: Mon, 22 Oct 2012 18:28:35 -0700
Message-ID: <CANMdWTv1ioRZerVK0zyot-Ge-26N+=L+x+9niXTCxmtzjdmoEw@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: WHATWG <whatwg@whatwg.org>, Elliott Sprehn <esprehn@gmail.com>
On Fri, Oct 19, 2012 at 3:43 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Fri, 19 Oct 2012, Elliott Sprehn wrote:
> >
> > I was working on a bug recently where authors had complained about
> > WebKit's behavior where clicking a scrollbar unfocuses the
> > activeElement. What's particularly quirky is that the window scrollbar
> > never moves focus in any browser I tried, but overflow scrollbars inside
> > the page *do* move focus in WebKit, IE and Opera but not in Gecko.
> >
> > This behavior seems unfortunate because it means scrolling a form inside
> > an overflow div moves focus from where you were typing and it's also
> > really weird that window scrollbars are special.
> >
> > What's the correct behavior here? It would be best if all the browsers
> > could be consistent, but I'm not sure the existing common behavior is
> > best. :)
>
> From the spec's point of view, I think this is just something where you're
> supposed to try to match the host platform conventions.
>

This doesn't have to be specced, but it also doesn't really seems to be a
platform convention issue. The platforms that have scrollbars are all the
same (i.e. clicking on the scrollbar never moves focus) and no browser
fuller matches platform that convention. Gecko's behavior is most
consistent with that, except Gecko *does* move focus if you click on a
textarea scrollbar. It seems especially bad that you get a different
behavior if you click on the scrollbar of the window vs. the scrollbar of
an overflow:auto element that fills the window
Received on Tuesday, 23 October 2012 01:29:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT