Mozilla has a fix for Flash causing Firefox's window to lose focus
A bug was discovered back in mid 2012 that caused the Firefox browser window to lose focus under certain circumstances when Flash contents were played in it.
What this meant is that Firefox users had to click on the browser window to make it the active window on the system again even if it was the active window before. The bug several issues including that keyboard shortcuts like Ctrl-T to open a new tab in the browser would not register anymore.
The system the bug was encountered on was a x86 Windows 7 operating system with Flash 11.3 initially but other systems such as Windows 8.1 are also affected by it according to user reports.
According to Mozilla, it is a bug in Flash and not in Firefox that is causing the issue for users of the browser.
The issue was quickly linked to Flash's Protected Mode. Users who disabled the mode or ran operating systems were it was not available did not experience the issue.
Reproduce the issue
To reproduce the issue you need to visit a web page that runs Flash contents, e.g. http://www.adobe.com/software/flash/about.
You will notice that Flash processes are loaded when you open the Task Manager of the system with Ctrl-Shift-Esc.
It is then necessary to close all windows that play Flash contents again and wait until the Flash process is terminated automatically.
When you then open a web page with Flash again, Firefox will lose focus.
Other bugs may be related to the issue, for instance that new windows open in the background and not foreground on the system.
Fixing the issue
Mozilla cooperated with Adobe on the bug but a solution was nowhere in sight.
Yesterday, Aaron Klotz published a comment on the Bugzilla but report that confirmed that a possible patch for the issue has been found.
Possible patch using LockSetForegroundWindow
This patch wraps out of process NP_Initialize calls with LockSetForegroundWindow. This appears to do the right thing.
The implementation is currently being tested but it looks promising so far. If no issues are discovered during tests, it may find its way into Firefox Nightly quickly and from there on all the way down to the stable version of the browser.
Update:Â It appears that Adobe has fixed the bug as well in Flash Player 15.
Firefox will now retain focus when Flash Player processes are launched (3223393)
Patch from CHEF-KOCH:
Not use flash, end of story and works with every system and every os.
I use the ViewTube_GM script from Greasefork/Userscripts which provide support for known platforms such as YouTube, Facebook, Vimeo, dailymotion, metacafe and many more. Some sites e.g. YouTube also use nativ Html5 which is enabled for never browser by default. From what I know every flash player frame can be converted to html5 video frame, there are several examples/scripts on the net how to do that (e.g. golem html5 script is an example to show on a flash site html5 videos).
While that is sound advice, it is not always possible to do so, especially in work environments.
I wish someone would tell me why I can’t load any of Cnet How-To videos in any browser. Half of CNN’s embedded videos on Facebook won’t load either. The message says this video is no longer available. But it plays fine on their website. :(
Today the Cnet videos are loading some of the time in Opera 23. But still not in Chrome or Firefox.
I’m using Windows 8.1 but was also having the same trouble in Windows 7.
I’m using the same extensions in Opera 23 and Chrome 64-bit
Above I said I can’t load Cnet How To Videos. I meant to say I can’t load any of their videos
I can never get CNET videos to play either.
I wish everyone would stop using FLASH. It would force websites to do away with it. Nothing is more frustrating than going to a website that REQUIRES you have flash and then a few feet away some guy is on an iPad on the same website. This pisses me off that flash is required because I’m using a laptop instead of iPad/iPhone.
I don’t use Flash. Don’t have it installed.
> While that is sound advice, it is not always possible to do so, especially in work environments.
I disagree, it’s a security risk to use flash in a such environments because it’s no secret that flash often gets hacked (because almost every page use it) and that should be the first reason to not use popular products that are often compromised if there are better alternatives.
I’m now 4 years without flash and there was never a problem or I need waste my time to update such product, and I never understand why Firefox/IE not native implement it in there browser and force the user with every patch tuesday/update to really get the latest updates/fixes, because from what I know most people/environments not get updates as often as they should.
I removed Adblock Plus in Firefox 31 and they still won’t play
I reset Firefox 31 settings in about:support. Now with no addons installed the Cnet videos play fine.
Sorry I bothered you with this. I finally figured it out on my own. The Disconnect addon in Firefox and Chrome was blocking Cnet Videos. But not in Opera 23.
thanks for the info, martin! really annoying bug…
Firefox 32 with GGC and Public Key Pinning.