PDA

View Full Version : a double click will fire two select event and a itemdbclick event



xunxin
6 Apr 2012, 8:33 PM
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.

33725

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.

scottmartin
7 Apr 2012, 7:17 AM
In your listener, are you using 'select' or 'itemclick'?

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

Regards,
Scott.

xunxin
7 Apr 2012, 5:51 PM
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.

scottmartin
8 Apr 2012, 5:59 AM
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.

xunxin
8 Apr 2012, 6:49 AM
thanks for your reply, i will try it.

gopalsaini
23 Sep 2012, 4:28 AM
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.