activate vs. click event
bj at altern.org
bj at altern.org
Sat Jul 10 04:10:47 BST 2004
On Friday 09 July 2004 17.39, Tobias Anton wrote:
> On Freitag, 9. Juli 2004 15:38, bj at altern.org wrote:
> > Problem: currently, radio buttons and checkbox react on the
> > MOUSEUP_EVENT.
>
> Yeah, but this is wrong and should therefore be changed. (Patch attached)
> But the onclick event listener should indeed _not_ be executed after the
> default event handler for the CLICK_EVENT. Reason: the event listener might
> cancel the event, which in turn should prevent the default action.
>
> And how can an event listener prevent something that already has happened?
I agree with you, but after some searching, I found quite a few examples where
the javascript code is supposed to be executed after the default event. For
example, most webmail clients have a checkbox that allows to check all
messages at once. Checking that checkbox should set all other checkboxes to
the same value as itself, and this _only_ works if the javascript is executed
after the default event...
I don't think that changing that behaviour would make a good impression on
users.
I am beginning to loose my mind with this crazy stuff!
Should we than leave the MOUSEUP_EVENT for checkboxes/radio so that it reacts
first, and change the HTMLInputElementImpl::click() event so that it also
generates a MOUSEUP_EVENT (so that clicking on a label could issue a click
and it would work fine)?
Any idea welcome.
jean-baptiste
More information about the kfm-devel
mailing list