Typing = in flash while using firefox

I came across a weird bug the other day, but it had a simple solution which Google — through ignorance or malice, though I hope the former — kept from me.

Typing the = character into flash resulted in a + when using Firefox!

The KeyboardEvent handled claimed:

  • keycode = 107
  • shift = false
  • charCode = 43
  • location = 3

But that’s not the right key! That’s the + key on the number pad! We were expecting:

  • keycode = 187
  • shift = false
  • charCode = 61
  • location = 0

Now you might be thinking one of two things: Slanty, slanty Firefox; or, I don’t believe it for even a second.

So here are some examples:

This one should display a + when you hit =, if you're using Firefox.

This one should work as expected.

The difference between those two is the wmode used when embedding. The first uses transparent, the second doesn’t.


If you want to be able to type = in Firefox, change the wmode parameter from transparent to anything else (direct, normal, or gpu) when embedding the swf.



  1. k says:

    I’m using firefox 3.5 beta 4 on windows XP 32-bit and did not encounter the bug. That sounds pretty atrocious though!

  2. Brad says:

    I am using 3.0.11 on windows XP and I have it. Sheldon checked it on his macawhatsit and it worked there too. Maybe it will be fixed in new firefoxs! 😀

  3. k says:

    Now I see this too, ffox 3.0.11 . It’s strange — html input boxes don’t do this. Is this a normal flash input control? I suppose a horrible workaround would be interfacing with an html input element via javascript.

  4. Brad says:

    haha, yeah javascript and maybe some ExternalInterface 🙁

    It’s a a fl.controls.TextArea, same thing with flash.text.TextArea. But also I am listening for keydown on the stage (which is what gets outputted in the lower text area).

  5. k says:

    Or you could handle all keyevents via externalinterface =O

  6. Brad says:

    all key events :O

    I guess you could just compare it to the one you receive in flash though and only act differently for that one situation?

  7. k says:

    I guess that would be best? Or maybe best to only forward potentially-wrong events from browser to flash? It sounds hard to coordinate them. You’d have to go back in time and change it =O I wonder which would come first, if it would always be the same or not.