Results 1 to 6 of 6

Thread: a double click will fire two select event and a itemdbclick event

  1. #1
    Sencha User
    Join Date
    Aug 2008
    Posts
    33
    Answers
    2

    Default a double click will fire two select event and a itemdbclick event

    Ext version tested:
    • Ext 4.1.0 RC2
    Browser versions tested against:
    • Chrome 17 (Windows 7)
    Description:
    When one row in a grid is dobule click, it will fire two select and a itemdbclick events.

    未命名.jpg

    the requirement is that: when the row '007' is slected, a tree will show in the bellow tabpanel, and double click will show a window.

    Unfortunately, the select event will be fired twice when it is double click, and so there are two tree showed as marked in the above image, and after then a window is opened.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716

    Default

    In your listener, are you using 'select' or 'itemclick'?

    select fires on row change, where itemclick is every click.

    Regards,
    Scott.

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    33
    Answers
    2

    Default

    yes, there is a select listener. for the double click event, will the framework fire two itemclick events and a itemdbclick event?

    thanks for your reply.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716

    Default

    Right.. replace your 'itemclick' with 'select'. You will get the result you want and select will only fire on record change. Itemclick will always fire ... and that is not what you want.

    Regards,
    Scott.

  5. #5
    Sencha User
    Join Date
    Aug 2008
    Posts
    33
    Answers
    2

    Default

    thanks for your reply, i will try it.

  6. #6

    Default Stop itemclick (twise) to be fire on itemdblclick event.

    TreePanel : I am using cellediting on double click & on single itemclick I expand/collaspe the tree panel node. So How can I skip itemclick on itemdblclick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •