Mouseenter & mouseleave aren't working correctly under FF.

25 views
Skip to first unread message

indigo

unread,
Nov 5, 2009, 8:13:05 PM11/5/09
to Prototype & script.aculo.us
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!

Alex McAuley

unread,
Nov 7, 2009, 6:09:01 AM11/7/09
to prototype-s...@googlegroups.com
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

indigo

unread,
Nov 7, 2009, 8:31:56 PM11/7/09
to Prototype & script.aculo.us
No, i'm afraid that's not the problem. I've tried both and the bug
stays.

Thanks for the help.


On 7 nov, 12:09, "Alex McAuley" <webmas...@thecarmarketplace.com>
wrote:
> 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 Mcauleyhttp://www.thevacancymarket.com

indigo

unread,
Nov 18, 2009, 5:56:23 PM11/18/09
to Prototype & script.aculo.us
Is there anything i can do about this? Should i wait for a future
release?
This bug breaks my application as it won't work in firefox.
Reply all
Reply to author
Forward
0 new messages