Firefox 3.6 Mac bug with MouseEvent

| 1 min read

Firefox 3.6 introduced a very annoying bug, and only on a Mac.

If you're using somewhere a MouseEvent.ROLL_OUT or MouseEvent.MOUSE_OUT, this event will fired even if you only click on a object without leave the object with the mouse.

The select box in the middle of the page doesn't work because a roll out event is fired when you click on it.

I didn't try yet to find a fix with MOUSE_UP and MOUSE_DOWN, but the problem is, all the existing sites that are using those events might be broken...

I believe Firefox is, or not firing the right event, or removing and putting back the flash so it loses the focus, meaning roll out is fired... A friend told me that the same things happen with java applet, didn't verify it yet.

Bug report

To test it, paste this as a document class:

package com.soundstep.baseui.demo {
import flash.events.MouseEvent;
import flash.display.Sprite;
public class Main extends Sprite {
public function Main() {
var s:Sprite = new Sprite();
s.graphics.beginFill(0xFF0000);
s.graphics.drawRect(0, 0, 100, 100);
s.addEventListener(MouseEvent.MOUSE_OUT, test);
addChild(s);
}
private function test(e:MouseEvent):void {
trace("ok");
}
}
}

Click on the square and you'll see that the MOUSE_OUT is fired...

I hope they'll fix soon or I'll have to find a hack and change everything that is live.