W3C home > Mailing lists > Public > public-canvas-api@w3.org > July to September 2013

Re: drawSystemFocusRing implementation details

From: Richard Schwerdtfeger <schwer@us.ibm.com>
Date: Fri, 16 Aug 2013 12:14:15 -0500
To: Charles Pritchard <chuck@jumis.com>
Cc: public-canvas-api@w3.org
Message-ID: <OF3E36686B.18F6CE64-ON86257BC9.005E7220-86257BC9.005EB061@us.ibm.com>

Charles,

To my knowledge the browser draws the focus ring for all focused elements
and not the operating system. This is also why authors are able to replace
the outline text style for focused items. This is essentially DOM focus.
So, I don't believe the WhatWG spec. is correct.

Rich


Rich Schwerdtfeger

Charles Pritchard <chuck@jumis.com> wrote on 08/16/2013 10:40:38 AM:

> From: Charles Pritchard <chuck@jumis.com>
> To: public-canvas-api@w3.org,
> Date: 08/16/2013 10:41 AM
> Subject: drawSystemFocusRing implementation details
>
> 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 17:14:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:31:55 UTC