In this post the problem is also mentioned.. Anyone added this code to the tree?
http://www.yui-ext.com/forum/viewtopic.php?p=12168&sid=f4b7bac2af8fa03882e9f3899c53fed6
Thanks
Marco
- 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
My tree contains only folders.. Each folder contains objects that are shown in a (paging) grid in the center panel.. I want to have multiple tabs in the centerpanel, each tab contains the objects from a folder.. Users can decide if they want to view the contents in a separate tab (or load the contents in the active tab) by dblclicking (at least that was my idea)
Thanks
Marco
. click = change activepanel in center with a new page
. dblclick = add new panel in center with a new page
Out of curiosity, are you saying that double-clicking an existing node in the tree creates a newly added node/panel? That seems like a strange interaction to me. I would think you'd have a special "Add" node or a separate button outside the tree.
- grid
. click = load preview
. dblclclick = show edit dialog
Seems like you'd want both to happen regardless, right? If you have an active preview loaded and you immediately double-click on a different row, you would want to refresh the preview AND show the edit for the previewed item right?
"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.
#If you have any other info about this subject , Please add it free.# |