Its more than likely the findElement() that isnt working as the console.log
without using it works fine...
What about somehting like this...
var el=event.element(event);
$(el).addClassName('doesntwork');
Alex Mcauley
http://www.thevacancymarket.com
----- Original Message -----
From: "indigo" <[email protected]>
To: "Prototype & script.aculo.us" <[email protected]>
Sent: Friday, November 06, 2009 1:13 AM
Subject: [Proto-Scripty] Mouseenter & mouseleave aren't working correctly
under FF.
>
> When you have some text input fields and you observe it for
> mouseenters or leaves, it doesn't work correctly under Firefox 2.0+.
> Everything works great under Safari, IE and Chrome.
> I guess this problem has something to do with the famous Firefox
> cursor bug.
>
> This works incorrect (only when you move very slowly over the input
> fields, and event will fire):
>
> [CODE]
>
> $$('input').each(function(current) {
>
> Event.observe(current,'mouseenter',function(event) {
> event.findElement().addClassName('doesntwork');
> });
>
> Event.observe(current,'mouseleave',function(event) {
> event.findElement().removeClassName('doesntwork');
> });
>
> });
>
> [/CODE]
>
>
> This works correct:
>
> [CODE]
>
> $$('input').each(function(current) {
>
> Event.observe(current,'mouseenter',function(event) {
> console.log('enter');
> });
>
> Event.observe(current,'mouseleave',function(event) {
> console.log('leave');
> });
>
> });
>
> [/CODE]
>
>
> If someone could find a fix for this, that would really help me out.
>
> Thanks!
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---