<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yes, that seems to be the problem.<br>
The mousedown/mouseup should not be handled if the event is a click or
double click.<br>
But the code cannot determine if it is a click or double click when the
mouseup/down occurs.<br>
Delaying the event will likely cause a very bad user experience.<br>
<br>
Well, the conclusion is: It cannot be done.<br>
Thank you for looking at it.<br>
<br>
<tt>Regards, Kenneth Skovhede, GEOGRAF A/S</tt><br>
<br>
<br>
Eric Lemoine skrev:
<blockquote
 cite="mid:5ec103de0806091159u2998eac0uf02f9253c997ef5f@mail.gmail.com"
 type="cite">
  <pre wrap="">On Mon, Jun 9, 2008 at 8:20 PM, Kenneth Skovhede, GEOGRAF A/S
<a class="moz-txt-link-rfc2396E" href="mailto:ks@geograf.dk">&lt;ks@geograf.dk&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Yes. I have the problem even though I always activate the click handler
last.

As always, the actual code is deep within a lot of unrelated code.

I have constructed the following example to illustrate my point.
I would expect that "doubleclick" and "click" would override the
draghandler, but it does not.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Thanks for the example, this helped me understand why you want. And I
think that what you want cannot be achieved. The click handler doesn't
care about the mousedown event so it lets it propagate. If the click
handler prevented the mousedown event from propaging that wouldn't
help you either, because (once the click handler activated) the box
handler will *never* see mousedown events. Try the following to
understand the latter:

// append these lines after creating the click handler
var clickhandler_mousedown = dblclick.mousedown;
clickhandler.mousedown = function(evt) {
    clickhandler_mousedown.call(clickhandler, evt);
    return false; // prevent propagation
};

--
Eric
  </pre>
</blockquote>
</body>
</html>