W3C home > Mailing lists > Public > www-svg@w3.org > June 2008

Re: event bubbling and focusHighlight

From: Jonathan Chetwynd <j.chetwynd@btinternet.com>
Date: Tue, 17 Jun 2008 15:51:54 +0100
Cc: www-svg <www-svg@w3.org>
Message-Id: <CA5AB71D-3185-476A-A00B-11337B119005@btinternet.com>
To: Erik Dahlström <ed@opera.com>
Erik,

thanks for the rapid response,
my concern is that when navigating with the keyboard the  
focusHighlight surrounds the element with focus in each case.
however when using the mouse, the focusHighlight surrounds the  
descendent clicked, when this has not been set to be focusable  
directly, rather than the element which was set to monitor focus events.
there is an additional issue that 7 alert dialogues are raised on the  
middle element, why might this might be?

on a related issue, is it the case that title content is always that  
of the child, where there is a choice?
eg the fruit all have title fruit but this isn't displayed in the  
tooltip.

evidently one workaround for these issues is to include a transparent  
top layer, possibly shaped where necessary to the underlying parts.
however this solution lacks elegance.

regards


Jonathan Chetwynd

j.chetwynd@btinternet.com
http://www.openicon.org/

+44 (0) 20 7978 1764


On 17 Jun 2008, at 14:16, Erik Dahlström wrote:

> On Tue, 17 Jun 2008 14:55:09 +0200, Jonathan Chetwynd <j.chetwynd@btinternet.com 
> > wrote:
>
>> event bubbling and focusHighlight
>>
>> is the behaviour of Opera 9.5 with respect to the focusHighlight in
>> the example attached correct?
>>
>> http://www.openicon.org/temp/focusable-scriptFocus-opera.svg
>>
>> would other similar examples improve our understanding?
>
> Try this instead:
> alert("e.target: " + e.target + " e.currentTarget: " +  
> e.currentTarget + " type: " + e.type);
>
> The left use element listens to the 'focus' event. The 'focus' event  
> is legacy from HTML, partially described here[1]. It doesn't bubble.
> The middle use element listens to the 'DOMFocusIn' event[2][3].  
> 'DOMFocusIn' bubbles.
> The right use element doesn't listen to events, but is focusable.
>
> Hope this helps
> /Erik
>
> [1] http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents
> [2] http://www.w3.org/TR/SVG11/interact.html#SVGEvents
> [3] http://www.w3.org/TR/SVGMobile12/interact.html#SVGEvents
>
> -- 
> Erik Dahlstrom, Core Technology Developer, Opera Software
> Co-Chair, W3C SVG Working Group
> Personal blog: http://my.opera.com/macdev_ed
Received on Tuesday, 17 June 2008 14:52:53 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:39 GMT