I've had unintended results as well, especially when developers use a lot of
JavaScript to trigger different results. I've seen problems where an
"onClick" and "onFocus" event was trap and handle a double-click. The extra
fire_events caused all clicks to be trapped as double clicks. In another
case, one has fired before another in a way unintended by the script which
caused a race condition error in the JavaScript handling. These are somewhat
rare, but underline why I prefer doing fire_events by hand in some cases.
Most of the time I'm happy with them kicking off without having to worry
about it, but there are some cases where they produce unintended results.

-Jonathan  

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Paul Rogers
> Sent: August 10, 2005 10:52 AM
> To: [email protected]
> Subject: Re: [Wtr-general] onBlur
> 
> its certainly easy for us to verify this, I was just hoping 
> you'd already done the work :-)
> 
> Firing these extra events can have some unexpected results, 
> Id seen one which led me change the radio/checkbox events a 
> few weeks back.
> 
> Paul
> 
> ----- Original Message -----
> From: Bret Pettichord <[EMAIL PROTECTED]>
> Date: Wednesday, August 10, 2005 10:18 am
> Subject: Re: [Wtr-general] onBlur
> 
> > I don't know for sure whether IE (meaning Microsoft IE, not
> > Watir::IE)
> > would automatically fire the onBlur event. But I was under the 
> > impression that it never sends extra events when accessed 
> via COM as 
> > we do.
> > That's why
> > we have to explicitly fire events. True?
> > 
> > I also don't understand how multiple onBlur events would lead to 
> > trouble.
> > This would be like clicking into and then out of a text field right?
> > Usually harmless.
> > 
> > The thing to do is to attach some code to the event in question and 
> > then observe when it is fired. Right?
> > 
> > Bret
> > 
> > At 10:39 AM 8/10/2005, Paul Rogers wrote:
> > >Bret,
> > >your recent addition of the onBlur event to text boxes got me
> > thinking.>
> > >Does IE fire the onBlur event already with out us adding it, if
> > you
> > >explicitly set focus to another item. Eg, using the code BEFORE
> > the
> > >addition ( I havent tried this )
> > >
> > >ie.text_field(:index,1).set('hi')
> > ># does the blur on text_field get fired by the next line?
> > >ie.button(:index,1).focus
> > >
> > >It seems, that this should work, but because of the way we access
> > IE maybe
> > >it didnt happen. Id like to make sure so we dont end up firing
> > multiple events.
> > >
> > >Paul
> > >_______________________________________________
> > >Wtr-general mailing list
> > >[email protected]
> > >http://rubyforge.org/mailman/listinfo/wtr-general
> > 
> > _____________________
> >  Bret Pettichord
> >  www.pettichord.com
> > 
> > _______________________________________________
> > Wtr-general mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/wtr-general
> > 
> 
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
> 

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to