Firefox often loses keyboard focus when switching tabs




12 years ago
7 years ago


(Reporter: ggerard, Unassigned)


3.5 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)




12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20061206 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20061206 Firefox/

Switching amongst tabs seems to cause Firefox to lose track of who should react to keyboard commands and cursor movement.

Control Page Down
Press the spacebar.
-- I'd expect the page to scroll it doesn't
Press the Page Down key
-- I'd expect the page to scroll it doesn't

It's not consistent either.
Sometime Alt-Tabbing to another application and back helps, but not always.

Reproducible: Sometimes

Steps to Reproduce:
Switch amongst tabs.
Try to do things on the keyboard.
Actual Results:  
No activity.

Expected Results:  

It seems like every page displayed to the user should always have some keyboard focus.

This is frustrating because it requires extra mousing which for those with RSI, hurts badly. This is why I consider this a major bug rather than normal. Software shouldn't cause the user physical pain :)

Comment 1

11 years ago
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b4) Gecko/2008030317 Firefox/3.0b4

I use keyboard shortcuts pretty heavily, especially in Google applications and I have found this bug to occur almost all of the time. Just open a tab, load Gmail, for instance, and try to use the keyboard shortcuts. You will need to click into the window before it accepts keyboard input!

Comment 2

10 years ago
I have had similar problems in both Firefox 2 and Firefox 3 on both Windows Vista Business and Windows Vista Home Premium. It is inconsistent, but the problem seems to show up more often when using Ctrl+PgUp/PgDn to switch tabs than when using Ctrl+Tab. Closing tabs with Ctrl+W also seems to increase the problem.

Additionally, I'm not sure if this is the same bug or not, but consistently, whenever a PDF file is opened in a background tab, it immediately takes the keyboard focus away from the foreground tab. This one does seem to be reproducible. If it's relevant, I'm using PDF Download and the Adobe Acrobat plugin that comes with Adobe Reader 9.0.0 for Windows Vista.

Comment 3

10 years ago
I'm growing old waiting for this bug to be fixed. I can't figure out what
triggers it, but focus often remains on the wrong tab after I switch.

I use keyboard only in all apps except firefox. Due to tendonitis, using the
mouse is difficult and painful for me. Please fix.

Comment 4

10 years ago
I also experience this problem sometimes in 3.0.x on openSUSE Linux 11.1. I have to use the mouse to bring the focus back to the page and then try the keyboard shortcut again.

Comment 5

9 years ago
I too have this problem with keyboard input. 

A very easy way to reproduce it is to use Facebook chat. When I try to chat in
Facebook, keyboard input ALWAYS stops responding the moment I receive a
message. The workaround (and a quite annoying one at that) is to click on the
Windows taskbar then back on the chat text input box.

I also had this problem intermittently on, workaround is the
same. Click anything that's not Firefox then click again on text input box.

I am running Windows 7 but I have had this problem since XP SP2 in 2007.
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
Whiteboard: [CLOSEME 5-15-2010]
Version: unspecified → 1.5.0.x Branch

Comment 7

8 years ago
This bug is still there in 3.5.9, the version that ships with the latest Ubuntu. Please close as WONTFIX, not WORKSFORME.
Why should we close as WONTFIX if the bug is still present? Are you maybe seeing bug 78414?
Whiteboard: [CLOSEME 5-15-2010]
Version: 1.5.0.x Branch → 3.5 Branch

Comment 9

8 years ago
Mozilla and Firefox have always suffered from focus bugs. I suspect it's due to the cross-platform nature of the application. Firefox tries to keep track of focus itself instead of letting X and gtk do it, resulting in confusion. I don't think this is fixable without a major re-write of the focus code. Do a search for "tab focus" bugs and you'll see what I mean.
Does anyone see this bug still with Firefox 4 in a fresh profile?
Reporter, Firefox 4.0.1 has been released, and it features significant improvements over previous releases. Can you please update to Firefox 4.0.1 or later, and retest your bug? Please also create a fresh profile (, update your plugins (Flash, Java, Quicktime, Reader, etc) and update your graphics driver and Operating system to the latest versions available. 

If you still continue to see this issue, please comment. If you do not, please close this bug as RESOLVED > WORKSFORME

filter: prefirefox4uncobugs

Comment 12

7 years ago
Even without a fresh profile, I haven't seen this problem in months. I suspect it was fixed somewhere in 3.6.

Comment 13

7 years ago
Closing WFM based on comment 12

If you are still experiencing this issue or have more information to provide feel free to post back here and we can re-open the bug. You can also get assistance by visiting the Firefox help site ->
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.