PDA

View Full Version : [FIXED-22] doubletap event on Dataview isn't called (0.82)



rdougan
3 Jun 2010, 2:01 AM
The onDoubleTap seems to be called, but the event isn't fired. Itemtap fires perfectly.

Line 191 in Dataview.js.


// private
onTap : function(e) {
var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
if (item) {
var index = this.indexOf(item);
if (this.onItemTap(item, index, e) !== false) {
e.stopEvent();
this.fireEvent("itemtap", this, index, item, e);
}
}
else {
if(this.fireEvent("containertap", this, e) !== false) {
this.onContainerTap(e);
}
}
},

// private
onContainerTap : function(e) {
this.clearSelections();
},

// private
onDoubleTap : function(e) {
var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
if (item) {
this.fireEvent("doubletap", this, this.indexOf(item), item, e);
}
},

TommyMaintz
3 Jun 2010, 11:01 AM
Alright, I'll look into this and make sure it works. I'm currently working on Ext.List (which extends DataView) and there is still a lot of work that needs to be done on both of them. Expect DataViews and Lists to work much better in the next release.

meyerovb
14 Aug 2010, 7:10 AM
Use dataview's itemdoubletap event. Double tap is the native dom event. Itemdoubletap gets the record and item passed to the handler. Currently the documentation lists a second itemtap event instead of itemdoubletap, this has been fixed for the next release.