Flex: Workaround for wmode bug

décembre 9th, 2008 · 25 Comments ·

You just turned wmode to « opaque » or « transparent » ?
Your keyboard does weird things in TextInputs and TextAreas ?
You are running Firefox ?
Then you just discovered a pretty flash bug called « THE WMODE BUG« .

Because everyone is complaining to Adobe and Adobe claims it is browsers fault, this issue might not be fixed tomorrow. Thus I’ve decided to create a workaround for non-standard keyboards. It currently supports 5 keyboards: French, Belgian, German, Swiss & Arabic, but the code has been designed to support other keyboards.

Here is an example. If you are using an Azerty keyboard try to type « ? » or « @ » char in both following text inputs.

view source

Two components have been created, extending TextArea and TextInput Flex components. It currently uses javascript functions getClientLang() and getBrowserName() for default settings. You can also force a keyboard configuration using the forceLang parameter.

You are free to use this code, adding new text components or new keyboards support. If you want your implementation to be published, send me an email: nicolas.cynober-at-pearltrees-dot-com.

Thanks to Hans Van de Velde (Beligan Keyboard), Christian Gambardella (German Keyboard), Ahmad Adel Eldardiry (Arabic Keyboard), Julien Wallen (Swiss-FR keyboard), Meir Rotstein (Hebrew keyboard), Ryszard Chrystyniak (Polish Keyboard & Spark version).

If your keyboard is not fixed yet, and you don’t want to code anything. You can use the following form to submit a list of wrong keys:

updates:

  • 06/2010: Add Hebrew and Polish keyboards.
  • 12/2009: Fix bug for english locale.
  • 05/2009: Stop supporting this code: pearltrees.com now use the default wmode. So this workaround has been used and tested during 5 monthes.
  • 05/2009: Fixing various bugs
  • 05/2009: Add a static const to disable easily the workaround
  • 05/2009: Add Arabic, German & Swiss keyboards.
  • 12/2008: Create a form helping people to submit wrong characters.

Note aux lecteurs: Ça vous est déjà arrivé de ne pas pouvoir faire de « @ » dans un site en flash ? Bah c’est ce problème là que j’essaye de résoudre. Problème qui survient uniquement sur certains types de claviers. Aucun problème sur les qwerty US…

Tags: Flex


25 responses so far ↓