[whatwg] Outline style to use for drawSystemFocusRing

Ian Hickson ian at hixie.ch
Mon Jan 6 20:41:10 PST 2014


On Mon, 6 Jan 2014, Rik Cabanier wrote:
> 
> I think you misunderstood. The drawCustomFocusRing() and 
> drawSystemFocusRing() don't cause scrolling, it's when you focus the 
> fallback element that the browser should scroll.

Doing this would imply remembering where the control was the last time the 
focusing ring was rendered, which would cause all kinds of problems for 
authors. Since the last time the control was rendered, maybe the rendering 
stopped showing the control, or maybe when it was last rendered, the 
control was rendered just off-screen on purpose so that it could be 
animated onto the center of the screen when focused... we simply can't 
know what the author is doing.

This is why there's a separate dedicated API for scrolling. If the author 
thinks that the user will want to scroll to the control when the control 
is focused, then it's trivial to do. But we should not force this 
behaviour. That's terrible API design.

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



More information about the whatwg mailing list