Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
Pressing a disclosure button also triggers the itemtap event
Hi,
Setting different handlers for the "disclosure" and "itemtap" events on a list doesn't work because both are called when the disclosure button is pressed.
Best regards,
Werner Donné.
-
Sencha User
you are right with 1.0.1a
as a workaround, you can check event target :
if (e.getTarget('.x-list-item-body') ) {
console.log("itemt tap!");
} else {
console.log("disclosure!");
}
-
Sencha User
Thank you for the workaround.
Werner.
-
Sencha User
Hello,
this bug is also on 1.1.0.
i add : Your trick did it to me, but sometimes when tap on event, the disclose also triggers. Don't know how to fix it.
-
Touch Premium Member
Where is "e" defined in this scenario?
twitter.com/epiphanydigital #sencha #drupal #jquery #craftbeer #guitar #photography
-
Sencha User
On the Sencha touch Doc :
Disclose : ( Ext.data.Record record, Ext.Element node, Number index,Ext.util.Event e )
So, it's the Event in the Disclose's arguments.
-
Touch Premium Member
What I ended up doing:
Code:
onItemDisclosure : true,
listeners : {
itemtap : function(record,index,item,e){
if (e.getTarget('.x-list-disclosure')) {
Ext.Msg.alert("Disclosure clicked!");
} else {
Ext.Msg.alert("Item clicked!");
}
}
}
Works great. Thanks guys!
Anyone have any idea how to change the icon????
twitter.com/epiphanydigital #sencha #drupal #jquery #craftbeer #guitar #photography
-
Sencha Premium Member
Simply add a 'cls' attribute on any .x-list-disclosure's parent (on the Ext.List itself for example)
Then change your .css :
.your-list-cls .x-list-disclosure {
-webkit-mask: none;
background-image: url('../img/trashcan.png') !important;
background-size: 100% 100%;
-webkit-background-size: 100% 100%;
background-color: transparent !important;
background-repeat: no-repeat;
background-position: center;
width: 2em;
height: 2em;
}
-
Touch Premium Member
twitter.com/epiphanydigital #sencha #drupal #jquery #craftbeer #guitar #photography
-
Sencha User
how to display details of selected record in next page
i want to display details of selected record in next page without a pressing a disclosure button