In my tree setup i'm catching the node click and dblclick, but for a doudble click the single click event is also raised..
In this post the problem is also mentioned.. Anyone added this code to the tree?
http://www.yui-ext.com/forum/viewtop...e9f3899c53fed6
Thanks
Marco
In this post the problem is also mentioned.. Anyone added this code to the tree?
http://www.yui-ext.com/forum/viewtop...e9f3899c53fed6
Thanks
Marco

#2
![]() |
![]() Qouted from quirksmoede:
"The dblclick event fires after the user has clicked twice in rapid succesion on the same element. All browsers support it. The incompatibilities are in the succession of events leading up to the dblclick. Every browser uses a different event order. In practice it is not possible to use both the click and dblclick events on the same element. The browsers aren't sufficiently able to distinguish between them" That said it depends on what you want to do when the click and dbl click happens. For example, I have had an outlook like list that onclick loads the preview and ondblclick opens an edit window. To avoid double loading the click just checks to see if the preview already contains the right information. So you can make your click handler look for evidence of a dblclick, bt the fact that it has been called twice. If you absolutely need to prevent the click handler from firing, you will need to delay the execution long enough to allow the dblclick to fire first and it will need to cancel the clickTimeout. ![]() |
#3
![]() |
![]() Thanks.. i've got a similar situation (on two places)..
- tree . click = change activepanel in center with a new page . dblclick = add new panel in center with a new page - grid . click = load preview . dblclclick = show edit dialog The default doubleclick delay in windows is set to 500ms.. That means that a click event should only be raised if not within 500ms a new click has been catched.. That's a long delay before something is happening after a single click.. I think i change the code to look for a shift / control key and single click.. Other ideas are welcome!! Thanks Marco ![]() |
#4
![]() | ||
![]() Quote:
Quote:
__________________
Brian Moeskau FAQ / Tutorials / User Extensions / Enhanced Forum Search ![]() |
#5
![]() | |
![]() Quote:
Thanks Marco ![]() |