- From: Rik Cabanier <cabanier@gmail.com>
- Date: Fri, 16 Aug 2013 16:11:04 -0700
- To: Charles Pritchard <chuck@jumis.com>
- Cc: public-canvas-api@w3.org
- Message-ID: <CAGN7qDD-E94MDWLH8eWHf1XzHV5wYFRDM9H3EW3JcZU4pw9ipg@mail.gmail.com>
Yes, the spec says that the focus ring is drawn directly into the canvas
bitmap.
I'm unsure how it could work differently (unless it's completely
redesigned).
element.onfocus = function(e) { ctx.drawSystemFocusRing(e.**target); };
How would this work? The canvas object doesn't know what area of the canvas
correspond to an element.
Rik
On Fri, Aug 16, 2013 at 8:40 AM, Charles Pritchard <chuck@jumis.com> wrote:
> Recently (off-list) I had a discussion about the implementation of
> drawSystemFocusRing.
>
> It was my understanding that system generated focus rings would be managed
> by the system, laid atop the Canvas element.
> This is in contrast to a  custom focus ring that the author draws and
> manages on their own Canvas bitmap (while still notifying the system).
>
> The current WHATWG spec suggests that drawSystemFocusRing should have the
> system draw a focus ring directly onto the Canvas bitmap.
> The W3C spec does not specify, it simply says to "draw" the focus ring.
>
> My thinking is that drawSystemFocusRing should be as easy for authors to
> use as:
> element.onfocus = function(e) { ctx.drawSystemFocusRing(e.**target); };
>
> That's in contrast to a custom focus ring:
> element.onfocus = function(e) { if(ctx.drawCustomFocusRing(e.**target))
> ctx.stroke(); };
> element.onblur = function() { myCustomRedrawMethod(); };
>
> Rik, do you have any thoughts on this?
>
> -Charles
>
>
Received on Friday, 16 August 2013 23:11:31 UTC