P T Withington wrote:
> On 2006-09-13, at 22:14 EDT, Max Carlson wrote:
> 
>> It shouldn't be necessary - my policy has been to only cancel event 
>> bubbling when it's required.  Also, we can't always get away with 
>> canceling for the other events.  For instance, I need mouseup to 
>> bubble up to the document so I can detect when the mouse goes up on a 
>> view besides the one clicked on.  That way I can send onmouseup on the 
>> original view.
> 
> Well, wait, bubbling only goes up through contained views no?  So you 
> can't rely on it to do your mouseup dance can you?  Don't you need to 
> use 'capture phase' for that?

Yes, bubbling only goes up through contained divs, which is why I have 
to do the mouseup dance in the first place.  Here's how it works: I 
store a reference to the last div to get a mousedown.  If the mouseup 
doesn't happen on this div I wait for it to bubble up to the document, 
look up the stored mousedown view, and send the onmouseup event to it.

>> It's interesting that cancelBubble=true doesn't work the same as 
>> returning false from the event handler...
> 
> That's annoying!

Indeedy.

-Max



_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to