[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: activate vs. click event
From:       bj () altern ! org
Date:       2004-07-10 1:03:19
Message-ID: 200407100310.47899.bj () altern ! org
[Download RAW message or body]

On Friday 09 July 2004 17.39, Tobias Anton wrote:
> On Freitag, 9. Juli 2004 15:38, bj@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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic