<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Fixing &#8220;:focus&#8221; in Internet Explorer</title>
	<atom:link href="http://james.padolsey.com/javascript/fixing-focus-in-internet-explorer/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com/javascript/fixing-focus-in-internet-explorer/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 02 Feb 2012 18:03:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Live-Dimension</title>
		<link>http://james.padolsey.com/javascript/fixing-focus-in-internet-explorer/comment-page-1/#comment-10132</link>
		<dc:creator>Live-Dimension</dc:creator>
		<pubDate>Thu, 16 Apr 2009 23:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=760#comment-10132</guid>
		<description>I believe I know of an almost better solution, especially if your not using JQuery.

http://www.xs4all.nl/~peterned/csshover.html
What this is is an internet explorer &quot;behaviour&quot;. Basically, you just shove this in your css.

body { behavior: url(&quot;csshover3.htc&quot;); }

Note that the file is relative to the HTML file calling, NOT the css. Of course, this is non-standards. Conditional comments pretty much fixes that - so it&#039;s usually easier to just use a  tag and put the behaviour in there.

Anyway, AFAIK it fixes :hover, :active, :focus for ALL elements from IE 6 and later (though :focus isn&#039;t in IE6 from what I&#039;ve just read).</description>
		<content:encoded><![CDATA[<p>I believe I know of an almost better solution, especially if your not using JQuery.</p>
<p><a href="http://www.xs4all.nl/~peterned/csshover.html">http://www.xs4all.nl/~peterned/csshover.html</a><br />
What this is is an internet explorer &#8220;behaviour&#8221;. Basically, you just shove this in your css.</p>
<p>body { behavior: url(&#8220;csshover3.htc&#8221;); }</p>
<p>Note that the file is relative to the HTML file calling, NOT the css. Of course, this is non-standards. Conditional comments pretty much fixes that &#8211; so it&#8217;s usually easier to just use a  tag and put the behaviour in there.</p>
<p>Anyway, AFAIK it fixes :hover, :active, :focus for ALL elements from IE 6 and later (though :focus isn&#8217;t in IE6 from what I&#8217;ve just read).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anthony</title>
		<link>http://james.padolsey.com/javascript/fixing-focus-in-internet-explorer/comment-page-1/#comment-10118</link>
		<dc:creator>anthony</dc:creator>
		<pubDate>Thu, 16 Apr 2009 19:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=760#comment-10118</guid>
		<description>That&#039;s pretty good. I would put something in the focusIsSupported function to find the currently focused element, then refocus it before returning.  That way whatever element is focused on page load is still the focused element when the function returns.

Something like
var currentFocus = document.activeElement &#124;&#124; null;
// code to check focus
if(currentFocus) currentFocus.focus();

return supported;

document.activeElement doesn&#039;t work on all browsers, but since IE it works in IE and IE is the problem, it should be okay.</description>
		<content:encoded><![CDATA[<p>That&#8217;s pretty good. I would put something in the focusIsSupported function to find the currently focused element, then refocus it before returning.  That way whatever element is focused on page load is still the focused element when the function returns.</p>
<p>Something like<br />
var currentFocus = document.activeElement || null;<br />
// code to check focus<br />
if(currentFocus) currentFocus.focus();</p>
<p>return supported;</p>
<p>document.activeElement doesn&#8217;t work on all browsers, but since IE it works in IE and IE is the problem, it should be okay.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Schalk Neethling</title>
		<link>http://james.padolsey.com/javascript/fixing-focus-in-internet-explorer/comment-page-1/#comment-10104</link>
		<dc:creator>Schalk Neethling</dc:creator>
		<pubDate>Thu, 16 Apr 2009 17:30:14 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=760#comment-10104</guid>
		<description>Nice stuff James! Will definitely try this out.</description>
		<content:encoded><![CDATA[<p>Nice stuff James! Will definitely try this out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

