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

drawSystemFocusRing implementation details

From: Charles Pritchard <chuck@jumis.com>
Date: Fri, 16 Aug 2013 08:40:38 -0700
Message-ID: <520E47F6.4030801@jumis.com>
To: public-canvas-api@w3.org
Recently (off-list) I had a discussion about the implementation of 

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?

Received on Friday, 16 August 2013 15:41:02 UTC

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