<?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: Remove onClick delay on webkit for iPhone</title>
	<atom:link href="http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/feed" rel="self" type="application/rss+xml" />
	<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone</link>
	<description>Web and mobile development</description>
	<lastBuildDate>Mon, 06 Sep 2010 14:55:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Pat</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-6271</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Fri, 20 Aug 2010 16:01:44 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-6271</guid>
		<description>Wow... just realized, if the browser is using the more specific initMouseEvent (to fake/substitute a &#039;late&#039; click event), it is specifying the x and y, but (perhaps) assuming the target will be the same... a completely artificial click with properties carried over from the touchend event.</description>
		<content:encoded><![CDATA[<p>Wow&#8230; just realized, if the browser is using the more specific initMouseEvent (to fake/substitute a &#8216;late&#8217; click event), it is specifying the x and y, but (perhaps) assuming the target will be the same&#8230; a completely artificial click with properties carried over from the touchend event.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-6269</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Fri, 20 Aug 2010 15:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-6269</guid>
		<description>Great to have - was beating my head against the wall over this.  It appears that safari for iphone/ipad does even worse than suspected: we&#039;ve encountered the kink that if you move the touched element in the window between touchend and click (that 300ms delay), safari fires the event - at the screen coordinate, not on the original target. This means you could clickjack just by swapping elements during that delay window.</description>
		<content:encoded><![CDATA[<p>Great to have &#8211; was beating my head against the wall over this.  It appears that safari for iphone/ipad does even worse than suspected: we&#8217;ve encountered the kink that if you move the touched element in the window between touchend and click (that 300ms delay), safari fires the event &#8211; at the screen coordinate, not on the original target. This means you could clickjack just by swapping elements during that delay window.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alberto</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-1712</link>
		<dc:creator>Alberto</dc:creator>
		<pubDate>Sun, 13 Jun 2010 08:21:36 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-1712</guid>
		<description>Ciao, non so se ti ricordi della mail e della richiesta che ti avevo fatto. 
Ho aspettato a richiedertelo via mail perchè immaginavo che avesti aggiornato lo script.
Comunque ti ricordo i due &quot;buchi&quot; che avevo riscontrato (io ho usato e uso il primo script e non il secondo script relativo a come applicarlo ad una precisa classe css):
-lo scroll non funziona, ma l&#039;ho risolto spostato il preventdefault nel touchend.
-Ora c&#039;è il problema che lo scroll funziona ma quando scrolli e passi il dito su dei menu in tali menu si evidenzia l&#039;effetto hover del menu anche se non li vuoi cliccare ma ci passi il dito sopra solo per scrollare.
-Ho un altro problema: il select del forms non funziona, o meglio, togliendo il tuo script funziona, lasciandolo funziona ma soltanto se quando ci clicco tengo premuto per un po&#039; più di tempo il dito.

Aspetto questo aggiornamento, grazie.</description>
		<content:encoded><![CDATA[<p>Ciao, non so se ti ricordi della mail e della richiesta che ti avevo fatto.<br />
Ho aspettato a richiedertelo via mail perchè immaginavo che avesti aggiornato lo script.<br />
Comunque ti ricordo i due &#8220;buchi&#8221; che avevo riscontrato (io ho usato e uso il primo script e non il secondo script relativo a come applicarlo ad una precisa classe css):<br />
-lo scroll non funziona, ma l&#8217;ho risolto spostato il preventdefault nel touchend.<br />
-Ora c&#8217;è il problema che lo scroll funziona ma quando scrolli e passi il dito su dei menu in tali menu si evidenzia l&#8217;effetto hover del menu anche se non li vuoi cliccare ma ci passi il dito sopra solo per scrollare.<br />
-Ho un altro problema: il select del forms non funziona, o meglio, togliendo il tuo script funziona, lasciandolo funziona ma soltanto se quando ci clicco tengo premuto per un po&#8217; più di tempo il dito.</p>
<p>Aspetto questo aggiornamento, grazie.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matteo Spinelli</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-1582</link>
		<dc:creator>Matteo Spinelli</dc:creator>
		<pubDate>Mon, 07 Jun 2010 06:15:04 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-1582</guid>
		<description>the &quot;perfect&quot; click I think is:
&lt;code&gt;theEvent.initMouseEvent(&quot;click&quot;, true, true, e.view, 1, e.changedTouches[0].screenX, e.changedTouches[0].screenY, e.changedTouches[0].clientX, e.changedTouches[0].clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,0, null)&lt;/code&gt;

I think it&#039;s time to update the script :)</description>
		<content:encoded><![CDATA[<p>the &#8220;perfect&#8221; click I think is:<br />
<code>theEvent.initMouseEvent("click", true, true, e.view, 1, e.changedTouches[0].screenX, e.changedTouches[0].screenY, e.changedTouches[0].clientX, e.changedTouches[0].clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,0, null)</code></p>
<p>I think it&#8217;s time to update the script <img src='http://cubiq.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-1581</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Mon, 07 Jun 2010 05:15:32 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-1581</guid>
		<description>Using this script has given me fantastic results on a highly interactive site.    I have one addition that allows the X and Y coordinates to be passed along (necessary on my site) that you may consider adding.

			var theEvent = document.createEvent(&#039;MouseEvents&#039;);
			//theEvent.initEvent(&#039;click&#039;, true, true);
			theEvent.initMouseEvent( &#039;click&#039;, true, true, window, 1, e.changedTouches[0].clientX, e.changedTouches[0].clientY, e.changedTouches[0].clientX, e.changedTouches[0].clientY, false, false, true, false, 0, null );</description>
		<content:encoded><![CDATA[<p>Using this script has given me fantastic results on a highly interactive site.    I have one addition that allows the X and Y coordinates to be passed along (necessary on my site) that you may consider adding.</p>
<p>			var theEvent = document.createEvent(&#8216;MouseEvents&#8217;);<br />
			//theEvent.initEvent(&#8216;click&#8217;, true, true);<br />
			theEvent.initMouseEvent( &#8216;click&#8217;, true, true, window, 1, e.changedTouches[0].clientX, e.changedTouches[0].clientY, e.changedTouches[0].clientX, e.changedTouches[0].clientY, false, false, true, false, 0, null );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matteo Spinelli</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-1096</link>
		<dc:creator>Matteo Spinelli</dc:creator>
		<pubDate>Wed, 26 May 2010 15:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-1096</guid>
		<description>The scroller already implements the delay removal, you don&#039;t need to remove the delayed click inside iScroll.</description>
		<content:encoded><![CDATA[<p>The scroller already implements the delay removal, you don&#8217;t need to remove the delayed click inside iScroll.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: themis</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-1093</link>
		<dc:creator>themis</dc:creator>
		<pubDate>Wed, 26 May 2010 14:43:52 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-1093</guid>
		<description>Dear Matteo, 
I was very excited when i found your script, but after i used i realized that it breaks scrolling alltogether. Is there something that it can be done for this?</description>
		<content:encoded><![CDATA[<p>Dear Matteo,<br />
I was very excited when i found your script, but after i used i realized that it breaks scrolling alltogether. Is there something that it can be done for this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iPhone Click Event Delay &#124; The True Tribe</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-192</link>
		<dc:creator>iPhone Click Event Delay &#124; The True Tribe</dc:creator>
		<pubDate>Fri, 22 Jan 2010 23:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-192</guid>
		<description>[...] these cases, the trick is to use ontouchstart instead of onclick.   Share and [...]</description>
		<content:encoded><![CDATA[<p>[...] these cases, the trick is to use ontouchstart instead of onclick.   Share and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iFUN.de/iPhone :: Alles zum iPhone &#8722; Offline, mit Icon und im Vollbild: Tipps für den Entwurf eigener Web-Applikationen</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-191</link>
		<dc:creator>iFUN.de/iPhone :: Alles zum iPhone &#8722; Offline, mit Icon und im Vollbild: Tipps für den Entwurf eigener Web-Applikationen</dc:creator>
		<pubDate>Tue, 29 Dec 2009 16:25:07 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-191</guid>
		<description>[...] mit Javascript arbeitet - der intelligente Kern fast aller Web-Applikationen - sollte sich die auf cubiq.org abgelegten Ausführungen zum OnTouch-Event durchlesen. Das Javascript-Ereignis kann Verzögerungen bei der Interaktion mit [...]</description>
		<content:encoded><![CDATA[<p>[...] mit Javascript arbeitet &#8211; der intelligente Kern fast aller Web-Applikationen &#8211; sollte sich die auf cubiq.org abgelegten Ausführungen zum OnTouch-Event durchlesen. Das Javascript-Ereignis kann Verzögerungen bei der Interaktion mit [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevin</title>
		<link>http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/comment-page-1#comment-190</link>
		<dc:creator>kevin</dc:creator>
		<pubDate>Thu, 19 Nov 2009 18:54:09 +0000</pubDate>
		<guid isPermaLink="false">http://cubiq.org/?p=9#comment-190</guid>
		<description>Simplified cross-browser version:

&lt;pre&gt;Object.prototype.addOnClick = function(func){
	if( window.Touch ){
		this.addEventListener(&#039;touchstart&#039;, function(e){
			e.preventDefault();
			this.moved = false;
			this.addEventListener(&#039;touchmove&#039;, function(){
				this.moved = true;
			}, false);
			this.addEventListener(&#039;touchend&#039;, function(){
				this.removeEventListener(&#039;touchmove&#039;, this, false);
				this.removeEventListener(&#039;touchend&#039;, this, false);
				if( !this.moved ) func();
			}, false);

		}, false);
	} else{
		this.onclick = func;
	}
}&lt;/pre&gt;

Usage:

some_element.addOnclick( function(){ alert(&#039;hello world&#039;); } );</description>
		<content:encoded><![CDATA[<p>Simplified cross-browser version:</p>
<pre>Object.prototype.addOnClick = function(func){
	if( window.Touch ){
		this.addEventListener('touchstart', function(e){
			e.preventDefault();
			this.moved = false;
			this.addEventListener('touchmove', function(){
				this.moved = true;
			}, false);
			this.addEventListener('touchend', function(){
				this.removeEventListener('touchmove', this, false);
				this.removeEventListener('touchend', this, false);
				if( !this.moved ) func();
			}, false);

		}, false);
	} else{
		this.onclick = func;
	}
}</pre>
<p>Usage:</p>
<p>some_element.addOnclick( function(){ alert(&#8216;hello world&#8217;); } );</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)

Served from: cubiq.org @ 2010-09-06 20:31:32 -->