Re: [whatwg] Should scrollbars move focus?

On Mon, 22 Oct 2012, Ojan Vafai wrote:
> 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.
> >
> > 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.

On Mac, clicking the scrollbar moves focus in at least some native apps. 
For example, TextEdit: Type enough text to have a scrollbar, open the 
fonts panel (Command+T), click the search field, then click the scroll bar 
in the document window, and focus moves to the document window. But it may 
just be that the conventions are more subtle than that (e.g. window gets 
focused, but not the specific widget).


> 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

IMHO all the cases where this is inconsistent with the platform 
conventions are bugs, but that's a UA decision really.

Anyway, if we're agreed that it's out of scope of the spec, I'm good. :-)


On Fri, 26 Oct 2012, Elliott Sprehn wrote:
>
> So what's the consensus here? Should WebKit have Gecko's behavior? 
> Should we unify the world and make scrollbars never move focus even on 
> <textarea>? :)

I think it should just match the native platform conventions, but really 
that's up to you. :-)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 29 December 2012 07:08:43 UTC