An incredibly annoying bug plagues Firefox users on the Mac. Despite having been reported to Mozilla.org in June of 2006 — almost 4 years ago as of this writing — no one has attempted a fix. There has been no developer response or any indication of a timeframe in which it will be addressed.
Allow me to introduce my personal Firefox nemesis, bug #342564.
On the Mac platform, remember that pressing
cmd+left (the command key plus the left arrow) performs the same function as the
Home key on Windows and Linux, both of which send the cursor to the beginning of the line (BOL). Similarly, pressing
cmd+right (the command key plus the right arrow) performs the same function as the
End key on Windows and Linux, both of which send the cursor to the end of the line.
The problem is that Firefox assigns
cmd+left as page back and
cmd+right as page forward when the keyboard focus is not in a form element (although I do not know if this is by design or is just a result of porting Firefox to Mac OS X). For example, if you are writing a comment here and you press
cmd+left, Firefox will send the cursor to the beginning of the line. If your keyboard focus is on the page itself — and not in a text area form element — and you press
cmd+left, then Firefox will take you back a page (or do nothing if there is no page to go back to).
Unfortunately, it doesn’t always work this way. On some forms, Firefox fails to perform a BOL or EOL and, instead, performs a page back or a forward. If you are composing an e-mail in Gmail and you press
cmd+left expecting to go the beginning of the line, you will either be sent back a page or, if there is no page to go back to, nothing will happen at all.
At best, this bug makes it difficult to jump to the beginning or end of a line. At worst, this bug forces page switches on an unsuspecting user while completing a form.
This same problem appears in Google Docs and on sites that use either TinyMCE or CKEditor, and in a number of additional applications around the web. In other words, it is a major bug. Note that both Safari and Chrome properly handle these common Mac keyboard shortcuts.
Fixes That Do Not Work
I have seen recommended a number of fixes that do not work. Here are a few of them:
The Keyconfig or Keyfixer plugins
In many places on the web, users may be encouraged to try Firefox plug-ins to fix this problem. The problem is that, while installing a plug-in can force Firefox to no longer respond to
cmd+right, it does not restore these shortcuts’ standard behavior. Disabling them may help to prevent unwanted page changes, but if you use BOL and EOL a lot — like I do — then the problem remains unsolved.
I have yet to find any plug-in that fixes this bug.
Modifying the Behavior of Home and End Keys
Home key works differently than on Windows or Linux. On the Mac,
Home sends the cursor to document’s “home” or top left corner, while the
End key sends the cursor to the document’s “end” or bottom right corner. Many Mac users however, myself included, modify these to match their respective behavior on Windows and Linux. Doing this will not affect this outcome of this bug. Remapping
End to BOL and EOL respectively is effectively the same as pressing
cmd+right, so Firefox still fails to handle some forms.
The only workaround I have found is to use the emacs shortcuts: ctrl+a for beginning of line and ctrl+e for end of line. I believe that these shortcuts are designed into OS X itself, so these will work under most circumstances. Another option is to use the option key plus an arrow to jump from word to word in the desired direction.
In many cases the only thing you can do to get around this bug is to use a different browser. Whenever I plan to do any serious editing in Google Docs, I skip Firefox and go straight to Safari.
Links to Mentions of this Bug Around the Web
- Mozilla Support Forums: cmd+right arrow, cmd+left arrow not working in gmail text boxes
- Disable Firefox’s Command-Arrows page jump shortcuts
- Can’t go to beginning/end of line in Google Docs documents (Firefox, Mac OS X)
- Can I seize control of Cmd-Left in OSX?
- Mac OS X – go to beginning of line, or maybe not
- Disabling Cmd+Arrows in Firefox on a Mac
- Mac Home and End Keys
- cmd-[back arrow] on FF Mac navigates browser instead of moving cursor in editor
- As of December 23, 2010, it appears that a patch has been released and will be incorporated into Firefox 4. Hallelujah!
- March 23, 2011: Alas, Firefox 4 has been released, yet the bug remains.