How can one use setFocus?

Oops, forgot to include the mailing list as a recipient... Fixed now! :-)

---------- Forwarded message ----------
From: Helder Magalhães <>
Date: Thu, Jun 12, 2008 at 6:08 PM
Subject: Re: How can one use setFocus?
To: Jonathan Chetwynd <>

> How can one use setFocus?

Did you mean something like the attached file?

Transcript of file comment, set as "desc" element, (implementation
details can be seen in the file source itself):

       Sample usage of setFocus [1].
       Motivated by a SVG mailing list [2] post [3].
       Setting the "focusable" attribute [4] in the target text field
is part of the task as a visible caret is intended (see the original
post [3]).

       Seems to works in Opera 9.50.
       Known _not_ to work in Firefox 2/3, Opera 9.2x, ASV 3/6, Batik 1.7.

       Note that, although ASV 6 supports the "editable" property, it
doesn't recognize "setFocus". Also, "editable" is only recognized when
set to "true" (as a deprecated version of the SVG specification [5]
seems to have been used to implement this feature), which _will_ break
compliant implementations (such as Opera)!
       Finally, "another editable text field" was only added to ease
comparison and to somehow test implementation quality (it's not
required to achieve desired behavior).


While creating this sample, I was amazed by Opera (version 9.5)
improvements on this subject. One may easily see some in action [6]
(when using that browser version). Good work Opera team! ;-)

Hope this helps,

 Helder Magalhães


Received on Monday, 16 June 2008 08:47:14 UTC