Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    18
    Vote Rating
    0
    wdonne is on a distinguished road

      0  

    Default Pressing a disclosure button also triggers the itemtap event

    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é.

  2. #2
    Sencha User
    Join Date
    Mar 2008
    Posts
    129
    Vote Rating
    0
    art.home.ext is on a distinguished road

      0  

    Default


    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!");
    }

  3. #3
    Sencha User
    Join Date
    Feb 2011
    Posts
    18
    Vote Rating
    0
    wdonne is on a distinguished road

      0  

    Default


    Thank you for the workaround.

    Werner.

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    thomas.romera is on a distinguished road

      0  

    Default


    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.

  5. #5
    Touch Premium Member
    Join Date
    May 2011
    Location
    Norfolk & DC
    Posts
    100
    Vote Rating
    5
    epiphanydigital is on a distinguished road

      0  

    Default


    Where is "e" defined in this scenario?
    twitter.com/epiphanydigital #sencha #drupal #jquery #craftbeer #guitar #photography

  6. #6
    Sencha User
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    thomas.romera is on a distinguished road

      0  

    Thumbs up


    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.



  7. #7
    Touch Premium Member
    Join Date
    May 2011
    Location
    Norfolk & DC
    Posts
    100
    Vote Rating
    5
    epiphanydigital is on a distinguished road

      1  

    Default


    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

  8. #8
    Sencha User
    Join Date
    Mar 2008
    Posts
    51
    Vote Rating
    2
    art.dev.ext is on a distinguished road

      0  

    Default


    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;
    }

  9. #9
    Touch Premium Member
    Join Date
    May 2011
    Location
    Norfolk & DC
    Posts
    100
    Vote Rating
    5
    epiphanydigital is on a distinguished road

      0  

    Default


    Thanks!
    twitter.com/epiphanydigital #sencha #drupal #jquery #craftbeer #guitar #photography

  10. #10
    Sencha User
    Join Date
    Oct 2011
    Posts
    50
    Vote Rating
    0
    sathyan_8294 is on a distinguished road

      0  

    Default how to display details of selected record in next page

    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

Similar Threads

  1. disclosure and itemtap on list
    By stefx in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 2 Sep 2011, 4:23 AM
  2. how to add disclosure button to the list
    By lukesayaw in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 20 Oct 2010, 5:08 PM
  3. Replies: 2
    Last Post: 22 Sep 2010, 5:45 PM
  4. Any event available on pressing Ext.PagingToolbar Refresh button
    By syedarshadali in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 28 Oct 2009, 4:36 AM
  5. ColumnTree with column button that triggers an event
    By xnd in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 3 Sep 2009, 7:04 AM

Thread Participants: 7