<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Keeping Track of Focus</title>
	<atom:link href="http://briancrescimanno.com/2008/05/22/keeping-track-of-focus/feed/" rel="self" type="application/rss+xml" />
	<link>http://briancrescimanno.com/2008/05/22/keeping-track-of-focus/</link>
	<description>Thoughts on Ajax, Flex, and Rich Internet Applications</description>
	<pubDate>Thu, 04 Dec 2008 02:51:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: ArdMan</title>
		<link>http://briancrescimanno.com/2008/05/22/keeping-track-of-focus/#comment-202</link>
		<dc:creator>ArdMan</dc:creator>
		<pubDate>Thu, 10 Jul 2008 17:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=9#comment-202</guid>
		<description>Do you have a working example?  I still can't get the snippet above to work.
Or perhaps this isn't intended to work in Firefox or IE 6 (that's where I've tested it).

I'd love to have the ability to detect what element has focus.  Unfortunately, from what I've read elsewhere some events don't bubble up to the document (ie. focus, blur), but click and mouse events do.

I'd love to see this work.
Feel free to send me e-mail if that is more convenient.</description>
		<content:encoded><![CDATA[<p>Do you have a working example?  I still can&#8217;t get the snippet above to work.<br />
Or perhaps this isn&#8217;t intended to work in Firefox or IE 6 (that&#8217;s where I&#8217;ve tested it).</p>
<p>I&#8217;d love to have the ability to detect what element has focus.  Unfortunately, from what I&#8217;ve read elsewhere some events don&#8217;t bubble up to the document (ie. focus, blur), but click and mouse events do.</p>
<p>I&#8217;d love to see this work.<br />
Feel free to send me e-mail if that is more convenient.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://briancrescimanno.com/2008/05/22/keeping-track-of-focus/#comment-199</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Wed, 09 Jul 2008 18:44:27 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=9#comment-199</guid>
		<description>Good catch; I've corrected the code in the post above.</description>
		<content:encoded><![CDATA[<p>Good catch; I&#8217;ve corrected the code in the post above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ArdMan</title>
		<link>http://briancrescimanno.com/2008/05/22/keeping-track-of-focus/#comment-198</link>
		<dc:creator>ArdMan</dc:creator>
		<pubDate>Wed, 09 Jul 2008 18:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=9#comment-198</guid>
		<description>I snagged this code and tried to get an example up/running to watch it work.  
I'm not sure what I'm doing wrong, but (and I hate to ask)... 
does this actually work?

In Firefox 2.0.0.15, I'm getting a error at "getCurrentFocus()" saying it needs a colon because it's not a function.</description>
		<content:encoded><![CDATA[<p>I snagged this code and tried to get an example up/running to watch it work.<br />
I&#8217;m not sure what I&#8217;m doing wrong, but (and I hate to ask)&#8230;<br />
does this actually work?</p>
<p>In Firefox 2.0.0.15, I&#8217;m getting a error at &#8220;getCurrentFocus()&#8221; saying it needs a colon because it&#8217;s not a function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://briancrescimanno.com/2008/05/22/keeping-track-of-focus/#comment-41</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Fri, 30 May 2008 23:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://briancrescimanno.com/?p=9#comment-41</guid>
		<description>var FocusReader = Class.create({
    /** cleaner code and easier to track class level vars */
    currentFocus:null,
 
    initialize: function(){
        /** don't init focus var for binding */
        document.observe("focus", this.focusRead.bindAsEventListener(this));
    },
 
    focusRead: function(e){
        this.currentFocus = e.element();
    },
 
    getCurrentFocus(){
        return this.currentFocus;
    },
 
    getCurrentFocusId(){
        /** consider invoking apply() or call() on the function rather then directly invoking it - picky but sometimes can be cleaner */
	if(this.currentFocus.identify) return this.currentFocus.identify();
    }
 
});</description>
		<content:encoded><![CDATA[<p>var FocusReader = Class.create({<br />
    /** cleaner code and easier to track class level vars */<br />
    currentFocus:null,</p>
<p>    initialize: function(){<br />
        /** don&#8217;t init focus var for binding */<br />
        document.observe(&#8221;focus&#8221;, this.focusRead.bindAsEventListener(this));<br />
    },</p>
<p>    focusRead: function(e){<br />
        this.currentFocus = e.element();<br />
    },</p>
<p>    getCurrentFocus(){<br />
        return this.currentFocus;<br />
    },</p>
<p>    getCurrentFocusId(){<br />
        /** consider invoking apply() or call() on the function rather then directly invoking it - picky but sometimes can be cleaner */<br />
	if(this.currentFocus.identify) return this.currentFocus.identify();<br />
    }</p>
<p>});</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.187 seconds -->
