preventing accidental double clicks?
- Hey there
I seem to have stumbled upon a problem with my treeView. I have a tree
whose leaves, when clicked, load an iframe. The problem is that double
clicks pretty much ruin the page loaded in the iframe, so I am looking
for a way to prevent the accidental double click. The second click in
the double click should not trigger the onclick event of the tree.
I should mention that I have extended the tree class to fit my own
needs, so adding a double click event to the tree is not really a
problem - except, obviously, a double click is also two single clicks,
i.e. two onclick events.
I have a partial solution where I set a timer when the first click
happens, and don't allow another click to load the iframe for 500
miliseconds - but I'm thinking there might be a more elegant solution?
Does anyone have any idea?