<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -27,7 +27,7 @@
 	 * to jQuery.Event objects.
 	 */
 	 $.each(['touches', 'targetTouches'], function(){
-		 if (!($.inArray($.event.props, this))) {
+		 if ($.inArray(this, $.event.props) &lt; 0) {
 			 $.event.props.push(this);
 		 }
 	 });
@@ -275,10 +275,13 @@
 		 }, 
 		
 		getTouches: function(event) {
-			var touches = window.event &amp;&amp; window.event.targetTouches;
-			if (touches === undefined &amp;&amp; window.console) {
+			var touches = event.targetTouches,
+				console = window.console;
+				
+			if (touches === undefined &amp;&amp; console) {
 				console.warn('No event.targetTouches');
 			}
+			
 			return touches;
 		}
 	};</diff>
      <filename>jqswipe.js</filename>
    </modified>
    <modified>
      <diff>@@ -329,17 +329,12 @@
 				
 				test(&quot;test event monkey patch&quot;, function(){
 					var t = [[{pageX: 10, pageY:20}]],
-						tt = t;
+						tt = t.slice(0, t.length),
+						e = $.event.fix({touches: t, targetTouches: tt});
 					
-					expect(4);
 					
-					ok($.inArray($.event.props, 'touches'), 'touches added to event');
-					ok($.inArray($.event.props, 'targetTouches'), 'targetTouches added to event');
-					
-					$('#swipeTarget').bind('myEvent', function(e){
-						same(e.touches, t, 'event.touches set');
-						same(e.targetTouches, tt, 'event.targetTouches set')
-					}).trigger({type: 'myEvent', touches: t, targetTouches: tt});
+					same(e.touches, t, 'event.touches set');
+					same(e.targetTouches, tt, 'event.targetTouches set');
 				});
 
 			});</diff>
      <filename>test/test.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>900ef73d3c26f9a448f7c0a578660fe83e717446</id>
    </parent>
  </parents>
  <author>
    <name>Damien Lebrun</name>
    <email>dinoboff@hotmail.com</email>
  </author>
  <url>http://github.com/dinoboff/jQswipe/commit/2a274f28d8c5a48b3679fc71c2c7bdfaa6b49089</url>
  <id>2a274f28d8c5a48b3679fc71c2c7bdfaa6b49089</id>
  <committed-date>2009-10-25T06:18:31-07:00</committed-date>
  <authored-date>2009-10-25T06:18:31-07:00</authored-date>
  <message>Fix monkey patch to add touches and targetTouches to event

Wrong use of jQuery.inArray in implementation
and test.</message>
  <tree>cfe15f0e5a05436cd3201b1cc219f38536c3b2f0</tree>
  <committer>
    <name>Damien Lebrun</name>
    <email>dinoboff@hotmail.com</email>
  </committer>
</commit>
