Mozilla has a fix for Flash causing Firefox's window to lose focus

Martin Brinkmann
Aug 30, 2014
Updated • Aug 9, 2019
Firefox
|
10

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

flash player bug firefox

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)

Summary
Mozilla has a fix for Flash causing Firefox's window to lose focus
Article Name
Mozilla has a fix for Flash causing Firefox's window to lose focus
Description
Mozilla found a fix for a longstanding issue in Firefox that caused the browser window to lose focus under certain circumstances related to Flash.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. FX said on September 1, 2014 at 7:53 pm
    Reply

    http://download.mozilla.org/?product=firefox-32.0&os=win&lang=en-US

    Firefox 32 with GGC and Public Key Pinning.

  2. fokka said on August 30, 2014 at 10:26 pm
    Reply

    thanks for the info, martin! really annoying bug…

  3. Dwight Stegall said on August 30, 2014 at 4:23 pm
    Reply

    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.

    1. Dwight Stegall said on August 30, 2014 at 5:01 pm
      Reply

      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.

  4. CHEF-KOCH said on August 30, 2014 at 4:01 pm
    Reply

    > 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.

  5. Dwight Stegall said on August 30, 2014 at 3:27 pm
    Reply

    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.

    1. greg said on August 30, 2014 at 4:03 pm
      Reply

      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.

    2. Dwight Stegall said on August 30, 2014 at 3:40 pm
      Reply

      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

  6. CHEF-KOCH said on August 30, 2014 at 3:16 pm
    Reply

    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).

    1. Martin Brinkmann said on August 30, 2014 at 3:25 pm
      Reply

      While that is sound advice, it is not always possible to do so, especially in work environments.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.