I have something similar to the following:
<div onclick="divClickEvent();">
<img onmousedown="imgOnDownEvent();" />
</div>
The problem is that if you mouse down on the img, the div click fires on mouse up. I tried to override the div onclick by adding an onclick="return false;"
to the img element, but the div onclick is still firing. I also have a cancel bubble and return false in a document onmouseup event (which gets attached dynamically in the img ondown event).
I've run out of ideas. Why is the div still processing the event, and how do I stop it?