Firefox keyboard monitor test for Mac OS X

If 'Enable access for assistive devices' is turned on in the Universal Access Preference Pane, something called the Keyboard Monitor should be enabled, allowing applications such as macro utilities to do their thing. The only time this doesn't (and shouldn't) work is when the cursor is in any password field, including in web forms. This temporarily turns the Keyboard Monitor off for security reasons. As soon as the cursor leaves this field it should be turned on again.

An easy way to test this is to install and run the macro utility Typinator by Ergonis (which is well worth installing anyway :-) ), making sure 'Show Typinator in menu bar' is turned on in the preferences. Normally, the menu bar icon is a black 'T', but when the cursor is in a password field, the 'T' turns grey with a pair of bullets in the crossbar, which means the Keyboard Monitor is temporarily disabled. Click away from the password field and the 'T' returns to its original black, signifying that the Keyboard Monitor is enabled again. However, there appears to be a problem with Firefox...

There are five different tests here (links to the other four below), because I wasn't sure what was causing the problem - whether it was in my JavaScript, the excellent Prototype JavaScript library I use, or what. But now I'm pretty certain it's Firefox/Mac itself - I'm testing all this in version 3.6. All JavaScript apart from the Prototype library itself is in the headers of the pages, so please examine the source code to see what's going on.

One other thing has emerged from this testing: if the developer's extension Firebug is installed, and its window is open, whether as a separate window or in the bottom part of the main browser window, the problem doesn't arise because it appears that the focus briefly goes to Firebug when the form is submitted, thus re-enabling the Keyboard Monitor by default. So if you do have Firebug installed, be sure to close it before running these tests. (I have also run the tests with all my extensions disabled just to make sure none of them was responsible for the problem.)

Chris Sansom, March 2010

Test 1: Plain vanilla - no JavaScript, no CSS, nothing...

Open this page in Firefox. Try submitting the form in various ways (no need to type anything into the fields). If the cursor is in the User name field and you hit the Enter key, or if you click the Go button, everything behaves normally. If you clicked in the Password field on the way - maybe you typed something into it - you might have noticed the Typinator icon change, but it would change back when you clicked on either the User name field or the Go button. What happens, however, if you submit the form by hitting Enter when the cursor is in the Password field? Try it and see...