Archive for March, 2010

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.

Example there

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:

Actionscript:
  1. package com.soundstep.baseui.demo {
  2.     import flash.events.MouseEvent;
  3.     import flash.display.Sprite;
  4.     public class Main extends Sprite {
  5.         public function Main() {
  6.         var s:Sprite = new Sprite();
  7.         s.graphics.beginFill(0xFF0000);
  8.         s.graphics.drawRect(0, 0, 100, 100);
  9.         s.addEventListener(MouseEvent.MOUSE_OUT, test);
  10.         addChild(s);
  11.         }
  12.         private function test(e:MouseEvent):void {
  13.             trace("ok");
  14.         }
  15.     }
  16. }

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.

Romu

Vote in HexoSearch

Comments 17 Comments »