[Windmill-dev] Issue with click command and preventDefault
Matthew Eernisse
mde at osafoundation.org
Sat Dec 15 01:05:31 PST 2007
Mikeal et al,
It actually sounds like the problem is the opposite here -- the YUI
datatable is overriding the normal behavior. The preventDefault method
stops the default action normally taken by an event (in the case of an
anchor tag, navigating to the URL)..
And to be very specific, preventDefault doesn't stop propagation of the
event through the DOM -- but there is a separate method,
stopPropagation, which will do that.
As Robert noted, there are multiple combinations of propagation
(capturing/bubbling) and default-action for events, so we will
definitely need to support both of these. It's really the only way to
ensure people can get their UIs to behave they would with real user
interaction.
It should be relatively straightforward to add an option to specify
either preventDefault or stopPropagation for a particular event.
Matthew
Mikeal Rogers wrote:
> The goal of the windmill API is to simulate, as close as we possibly
> can, *real user simulation.*
>
> If the way we are calling click isn't propagating through the event
> listeners the way a normal user click would, then it's a bug. It may not
> be a bug we're able to fix at the end of the day, but it should still be
> treated as a bug and probably logged as such.
>
> The only reason you would have to go the extension route is if the only
> way to fire this event is some one off hack that works for your specific
> case. If it's possible to be more like a real user click we should try
> as hard as we can to make it that way.
>
> -Mikeal
>
More information about the Windmill-dev
mailing list