Roo/grid/Grid.js
authorAlan Knowles <alan@roojs.com>
Fri, 20 Dec 2013 03:22:55 +0000 (11:22 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 20 Dec 2013 03:22:55 +0000 (11:22 +0800)
Roo/grid/Grid.js

index 204551e..bb7d818 100644 (file)
@@ -449,7 +449,7 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, {
         c.on("contextmenu", this.onContextMenu, this);
         c.on("keydown", this.onKeyDown, this);
         if (Roo.isTouch) {
-            c.on("touchend", this.onTouchEnd, this);
+            c.on("touchstart", this.onTouchStart, this);
         }
 
         this.relayEvents(c, ["mousedown","mouseup","mouseover","mouseout","keypress"]);
@@ -536,16 +536,16 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, {
             return;
         }
         
-        this.fireEvent(name == 'touchend' ? 'click' : name, e);
+        this.fireEvent(name == 'touchstart' ? 'click' : name, e);
         var t = e.getTarget();
         var v = this.view;
         var header = v.findHeaderIndex(t);
         if(header !== false){
-            this.fireEvent("header" + (name == 'touchend' ? 'click' : name), this, header, e);
+            this.fireEvent("header" + (name == 'touchstart' ? 'click' : name), this, header, e);
         }else{
             var row = v.findRowIndex(t);
             var cell = v.findCellIndex(t);
-            if (name == 'touchend') {
+            if (name == 'touchstart') {
                 // first touch is always a click.
                 // hopefull this happens after selection is updated.?
                 name = 'click';
@@ -581,8 +581,8 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, {
         this.processEvent("click", e);
     },
    // private
-    onTouchEnd : function(e){
-        this.processEvent("touchend", e);
+    onTouchStart : function(e){
+        this.processEvent("touchstart", e);
     },
 
     // private