<?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: Changing Selection</title>
	<atom:link href="http://schinckel.net/2005/10/24/changing-selection/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net/2005/10/24/changing-selection/</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Sun, 07 Sep 2008 06:08:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/24/changing-selection/#comment-466</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Tue, 25 Oct 2005 05:38:08 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/24/changing-selection/#comment-466</guid>
		<description>Actually, really fuck internet explorer.

It is actually setting the selection, or at least creating a range, as I can do an &lt;code&gt;alert(sel.text);&lt;/code&gt;, but the selection isn't really being changed.

That is, if I &lt;em&gt;Ctrl-C&lt;/em&gt;, it is not added to the clipboard.  I could use the evil &lt;code&gt;clipboardData = sel.text;&lt;/code&gt; command, but I don't really want to.  It's not really fair to a user to overwrite whatever they had as the clipboard.

I did find another site that might be doing what I need.  They use an &lt;code&gt;href="javascript:highlight(0);"&lt;/code&gt;, which isn't the right way to do it, but I suspect it's textarea only, anyway.

Oh, and I apologise to IE users who are also getting the crappy resizing as you type I am getting in the comments box!</description>
		<content:encoded><![CDATA[<p>Actually, really fuck internet explorer.</p>
<p>It is actually setting the selection, or at least creating a range, as I can do an <code>alert(sel.text);</code>, but the selection isn&#8217;t really being changed.</p>
<p>That is, if I <em>Ctrl-C</em>, it is not added to the clipboard.  I could use the evil <code>clipboardData = sel.text;</code> command, but I don&#8217;t really want to.  It&#8217;s not really fair to a user to overwrite whatever they had as the clipboard.</p>
<p>I did find another site that might be doing what I need.  They use an <code>href="javascript:highlight(0);"</code>, which isn&#8217;t the right way to do it, but I suspect it&#8217;s textarea only, anyway.</p>
<p>Oh, and I apologise to IE users who are also getting the crappy resizing as you type I am getting in the comments box!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/24/changing-selection/#comment-465</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Mon, 24 Oct 2005 13:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/24/changing-selection/#comment-465</guid>
		<description>Doesn't work in Safari.  No selectAllChildren() method.

Fuck Safari too.  But less than IE.</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t work in Safari.  No selectAllChildren() method.</p>
<p>Fuck Safari too.  But less than IE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/24/changing-selection/#comment-464</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Mon, 24 Oct 2005 13:11:17 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/24/changing-selection/#comment-464</guid>
		<description>Fuck Internet Explorer.

It &lt;em&gt;was&lt;/em&gt; selecting the whole lot, just not updating the display to reflect it!

Grr.  Minutes wasted.</description>
		<content:encoded><![CDATA[<p>Fuck Internet Explorer.</p>
<p>It <em>was</em> selecting the whole lot, just not updating the display to reflect it!</p>
<p>Grr.  Minutes wasted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/24/changing-selection/#comment-463</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Mon, 24 Oct 2005 12:59:43 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/24/changing-selection/#comment-463</guid>
		<description>IE seems to have the ability to create alterations to it's selection:

&lt;code&gt;sel = document.selection.createRange();
div = document.getElementById("id");
sel.moveToElementText(div);&lt;/code&gt;

However, this doesn't seem to work.  If only IE had decent JavaScript console support.  Then I might be able to do this without having to save a huge file to the server and back again...</description>
		<content:encoded><![CDATA[<p>IE seems to have the ability to create alterations to it&#8217;s selection:</p>
<p><code>sel = document.selection.createRange();<br />
div = document.getElementById("id");<br />
sel.moveToElementText(div);</code></p>
<p>However, this doesn&#8217;t seem to work.  If only IE had decent JavaScript console support.  Then I might be able to do this without having to save a huge file to the server and back again&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Schinckel</title>
		<link>http://schinckel.net/2005/10/24/changing-selection/#comment-462</link>
		<dc:creator>Matthew Schinckel</dc:creator>
		<pubDate>Mon, 24 Oct 2005 12:40:02 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.blogsome.com/2005/10/24/changing-selection/#comment-462</guid>
		<description>You little ripper!

&lt;code&gt;sel = window.getSelection();
div = document.getElementById("id");
sel.selectAllChildren(div);&lt;/code&gt;

Works a treat in Mozilla.</description>
		<content:encoded><![CDATA[<p>You little ripper!</p>
<p><code>sel = window.getSelection();<br />
div = document.getElementById("id");<br />
sel.selectAllChildren(div);</code></p>
<p>Works a treat in Mozilla.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
