Re: drawSystemFocusRing implementation details

On Sat, Aug 17, 2013 at 10:28 AM, Charles Pritchard <chuck@jumis.com> wrote:

>  On 8/16/2013 8:28 PM, Rik Cabanier wrote:
>
>
> On Fri, Aug 16, 2013 at 6:33 PM, Charles Pritchard <chuck@jumis.com>wrote:
>
>> On Aug 16, 2013, at 5:13 PM, Dominic Mazzoni <dmazzoni@google.com> wrote:
>>
>> >
>> > It sounds like what you want is for the focus ring to be drawn on the
>> page, on top of the canvas (rather than into the canvas bitmap) - and you
>> want it to disappear when the element loses focus, whether the canvas is
>> redrawn or not.
>> >
>> > I'm not convinced that's better than the current spec - but I think
>> that'd be the right way to word what you're asking for.
>>
>>
>>  Thanks, yes, that's the behavior I'd like to see implemented.
>
>
>  I'm unsure how this could possibly work.
> Wouldn't you have to redraw the focus ring on every frame in this
> scenario?
>
>
>
> Are you asking about implementation or consumption of the API?
>

Both


>
> For consumption, the focus ring would show until the element is blurred or
> the canvas is reset (via height/width setters).
>

I think this is relying on magic. 'drawFocusRing(element)' just draw the
current path using the focus style if 'element' has the focus.
It would be strange if there's some code that would automatically remove
the focus ring.

What you want sounds more like an API where you can register areas with
corresponding elements and have the browser handle the refresh.

Received on Saturday, 17 August 2013 19:52:44 UTC