ISSUE-2031: Focus change event when elements are removed from the rendering tree

focus-remove-element

Focus change event when elements are removed from the rendering tree

State:
RAISED
Product:
SVG 2
Raised by:
Alexander Adam
Opened on:
2008-08-21
Description:
From the old tracker:
http://www.w3.org/Graphics/SVG/Group/track/issues/258

ISSUE-258
Focus change event when elements are removed from the rendering tree

Raised by: Andrew Emmons

Description:
ISSUE: focus change event when elements are removed from the rendering tree

Please see the SVG below – the file attempts to build a menu system using SVG
focus and
Animations. When the file is loaded, there are two focusable items. Move to the
second focusable item and then activate the focus.
The animations at the end of the file will change the display of the group to
‘none’ and display a new menu. Hitting activate again should show the original menu.

The intent of the design is to have each menu appear with focus on the first
item. However, it appears that the second item still has the focus because it
has never received the focusout event.
The issue is that in our implementation the event is having no effect because at
this point the elements which are the targets of this event have their display
set to none. The spec says that any elements with display set to none to not
receive any events. [1].

When the first menu is activated, the sequence of events is:

1. The current focus is activated
2. SMIL animation is triggered to change the display to none
3. Since the render tree now is changed, focus is re-evaluated
4. Once it’s determined that focus has changed, the focusout event is dispatched.

At stage 4 the event is never received because the element has display="none".

I think this content is logical and a common use of SVG 1.2’s focus feature –
but it leads to content that feels ‘broken’. So my questions for discussion are:

- Is the content is broken with respect to the spec?
- Is the spec broken and needs adjustments to clarify this case?
- Are both the spec and content fine and it’s our implementation?


<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">

<g id="menu1" focusable="false" display="none">
<rect id="button1Menu1" x="10" y="10" width="50" height="50"
fill="red">
<set attributeName="fill" to="blue" begin="focusin"
end="focusout"/>
</rect>

<rect id="button2Menu1" x="60" y="60" width="50" height="50"
fill="red">
<set attributeName="fill" to="blue" begin="focusin"
end="focusout"/>
</rect>
</g>

<g id="menu2" focusable="false" display="none">
<rect id="buttonMenu2" x="10" y="10" width="100" height="100"
fill="green">
<set attributeName="fill" to="yellow" begin="focusin"
end="focusout"/>
</rect>
</g>

<set xlink:href="#menu1" attributeName="display" to="inline" begin="0;
buttonMenu2.activate"/>
<set xlink:href="#menu1" attributeName="display" to="none"
begin="button2Menu1.activate"/>
<set xlink:href="#menu2" attributeName="display" to="inline"
begin="button2Menu1.activate"/>
<set xlink:href="#menu2" attributeName="display" to="none"
begin="buttonMenu2.activate"/>

</svg>


[1] http://www.w3.org/TR/SVGMobile12/painting.html#VisibilityControl
“Elements with display="none" do not take up space in text layout operations, do
not receive events and do not contribute to bounding box calculations."?

Related Actions Items:
Related emails:
  1. Re: Lose Focus When Hidden? (SVG ISSUE-2031) (from schepers@w3.org on 2009-02-23)
  2. Re: Lose Focus When Hidden? (SVG ISSUE-2031) (from ian@hixie.ch on 2009-02-22)
  3. Re: Lose Focus When Hidden? (SVG ISSUE-2031) (from schepers@w3.org on 2009-02-22)
  4. Re: Lose Focus When Hidden? (SVG ISSUE-2031) (from ian@hixie.ch on 2009-02-13)
  5. Re: Lose Focus When Hidden? (SVG ISSUE-2031) (from ian@hixie.ch on 2009-01-23)
  6. Re: Lose Focus When Hidden? (SVG ISSUE-2031) (from jonas@sicking.cc on 2009-01-22)
  7. RE: Minutes, 9 Sept 2008 SVG WG telcon (from niklas.hagelroth@ikivo.com on 2008-09-09)
  8. Minutes, 9 Sept 2008 SVG WG telcon (from chris@w3.org on 2008-09-09)
  9. Minutes, SVG telcon Thursday 4 September 2008 (from anthony.grasso@cisra.canon.com.au on 2008-09-04)
  10. Minutes, SVG Nuremberg Face-to-Face Day 1, Thursday 21 August 2008 (from anthony.grasso@cisra.canon.com.au on 2008-08-22)
  11. Related to ISSUE-2031 (from ed@opera.com on 2008-08-21)
  12. ISSUE-2031 (focus-remove-element): Focus change event when elements are removed from the rendering tree [SVG Tiny 1.2] (from sysbot+tracker@w3.org on 2008-08-21)

Related notes:

No additional notes.

Display change log ATOM feed


Dirk Schulze <dschulze@adobe.com>, Chair, Chris Lilley <chris@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 2031.html,v 1.1 2020/01/17 13:19:08 carcone Exp $