[adbe 3223393] Firefox window loses focus every time Flash plugin processes are (re-)launched

VERIFIED FIXED in Firefox 34

Status

()

Core
Plug-ins
VERIFIED FIXED
5 years ago
a year ago

People

(Reporter: Bob Hill, Assigned: aklotz)

Tracking

(Blocks: 1 bug)

13 Branch
mozilla34
x86
Windows 7
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify +

Firefox Tracking Flags

(firefox34 verified)

Details

(Whiteboard: [flash-11.3], URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
This is a "Tech Evangelism" bug to accompany Adobe bug number 3223393:

https://bugbase.adobe.com/index.cfm?event=bug&id=3223393

"Every time Firefox (re-)launches the three Flash plugin processes in
Windows-7, the Firefox window loses focus. Focus does not wander to any
other non-Firefox window - no window in the entire user environment has
focus any more. The Firefox window must be explicitly mouse-clicked to
restore its focus after the three Flash plugin processes have been
(re-)launched."

Occurs with Windows-7 SP1 (32-bit), Firefox 13.0.1, Flash 11.3.300.262.

Please refer to Adobe bug number 3223393 for full details of problem,
how to reproduce, how to circumvent, and for progress with resolution.
(Reporter)

Comment 1

5 years ago
Users experiencing this problem might like to add votes to Adobe bug number
3223393: the more votes, the higher priority Adobe should assign to the bug.

Comment 2

5 years ago
Can you try with protected mode disabled in Flash 11.3, please?
http://forums.adobe.com/thread/1018071?tstart=0 ('last resort')

Updated

5 years ago
Component: Add-ons → Plug-ins
Product: Tech Evangelism → Core
QA Contact: addons → plugins
Version: unspecified → 13 Branch
(Reporter)

Comment 3

5 years ago
(In reply to Loic from comment #2)
> Can you try with protected mode disabled in Flash 11.3, please?
> http://forums.adobe.com/thread/1018071?tstart=0 ('last resort')

As already stated in https://bugbase.adobe.com/index.cfm?event=bug&id=3223393
this problem does NOT occur with Flash Protected Mode disabled.  Please refer
to the Note entitled "Any Workarounds" at the very end of the Adobe Bug page.
Kind regards, Bob Hill (just another user, not Adobe employee)

Updated

5 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 764390

Comment 5

5 years ago
I reopen it because it seems to be a very similar issue to bug 764390, but slightly different.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: DUPLICATE → ---

Updated

5 years ago
Summary: Windows-7: Firefox Window loses focus every time Flash plugin processes are (re-)launched → [adbe 3223393] Firefox window loses focus every time Flash plugin processes are (re-)launched
Whiteboard: [flash-11.3]
Duplicate of this bug: 778484

Comment 7

5 years ago
This issue doesn't reproduce anymore with Flash 11.4.400.252.
Duplicate of this bug: 783270

Comment 9

5 years ago
i have .402.265

changing protected mode fixes the problem.

Comment 10

5 years ago
No problem reproducing this issue with 11.4.402.287. I have voted for this bug on the Adobe BugBase: "The way windows react is crucial to a efficient and predictive working flow. Switching back to a window you're working in every time the flash plugin stats is very, very annoying. It really hurts my working routine and it also hurts Firefox, as most people wont recognise this is a Flash problem."

Comment 11

5 years ago
I never seee this problem in my old, updated Windows XP Pro. SP3 machine, but I see it on my updated 64-bit W7 machines at work.

Comment 12

5 years ago
(In reply to Ant from comment #11)
> I never seee this problem in my old, updated Windows XP Pro. SP3 machine,
> but I see it on my updated 64-bit W7 machines at work.

Of course, protected mode doesn't exist for Flash on Win XP.

Comment 13

5 years ago
Loic: Ah, that explains it then. Thanks. :)

Updated

5 years ago
Duplicate of this bug: 815584
Duplicate of this bug: 819383
Duplicate of this bug: 825776
(Reporter)

Comment 17

4 years ago
The current situation with referenced Adobe Bug 3223393 is as follows:

1. Adobe has not yet found a way to launch the Windows-7 processes for
   "FlashPlayerPlugin_11_5_502_135.exe" without losing window focus.

2. Adobe has introduced a kludge in the form of code which attempts to
   regain focus asap after having lost it, resulting (at best) in the
   Firefox Taskbar Button "blinking" while focus is lost and regained.
   As well as being an inelegant approach this kludge is also far from
   bulletproof - when more than one Firefox window is open, the kludge
   sometimes succeeds in restoring focus to the wrong Firefox window!

3. Attempts to ask why Flash cannot launch a Windows-7 process without
   losing focus ("Notes" timestamped 11:36:04 PM PDT Oct 24, 2012 and
   1:04:45 AM PST Dec 15, 2012 in Bug 3223393) have not been answered.

4. Instead, Adobe is trying to sell the kludge  ("Notes" timestamped
   2:46:29 AM PST Dec 14, 2012 and 8:16:26 PM PST Jan 6, 2013 in Bug).

Some users suffering from this problem may blame Firefox for it rather
than perceiving it to be a Flash problem, so it might be in Mozilla's
interest to encourage Adobe to pursue a reliable and elegant solution.

Firefox doesn't lose focus when it launches "plugin-container.exe", so
why can't Flash launch "FlashPlayerPlugin_11_5_502_135.exe" without
losing focus?  Is there anyone at Mozilla who has a line of communi-
cation with people at Adobe, and could provide Adobe with hints/tips
about how to launch a Windows-7 process without losing window focus?

Comment 18

4 years ago
This is totally ridiculous that a major bug can go uncorrected for 7 months and counting.
Blocks: 790013

Comment 19

4 years ago
1) Hold the phone.  This bug has not been assigned correctly! Adbe 3223393 refers to a totally separate problem: in 3223393, the bug appears every 180 seconds (in 764390, it appears immediately), the focus is given to an imaginary window (in 764390, focus is clearly given to the Flash plugin), and a mouse-click restores focus (in 764390, a mouse-click does not restore focus). 

Adbe 3223393 ≠ Bugzilla 764390

2) And...whatever Adobe is doing, isn't this a Firefox issue, too? As Timwi said (back in...wow...July 2012!): "Despite, surely this is still a bug in Firefox. Firefox must not, under any circumstances, allow a plugin to compromise the ability to focus away from it by clicking outside of it. Firefox must always, without exception, send keyboard focus to the webpage when the webpage is clicked, no matter what the plugin does. The fact that plugins can break this is clearly a bug in Firefox."

Thus, I disabled Protected Mode. However, with all the security exploits with plugins (the debacle that is still happening with Java), I'd rather wish I didn't have to do this. :(

Comment 20

4 years ago
Whoops, sorry! Wrong bug; had two pages open. :(
Duplicate of this bug: 766072
Duplicate of this bug: 840649

Updated

4 years ago
Blocks: 833048
Duplicate of this bug: 833048
Can someone contact Adobe about this issue? because it's getting more and more annoying as it happens only in Firefox...

maybe someone know any workaround or Flash version which it didn't occurred.

Comment 25

4 years ago
Disabling the protected mode in Flash is the workaround.
My STR from dupe bug #815054

>1. Open Nightly
>2. Open Library
>3. Close Nightly browse window, so only Library will be opened
>4. Start opening some bookmarks from Library
>5. and try normally browse the web with Library window in background
>
>in near time you will see that Library window will steal focus
>and will go to first plan



(In reply to Loic from comment #25)
> Disabling the protected mode in Flash is the workaround.

Thanks!

Comment 27

4 years ago
I can't help any with the resolution of this but I opened a ticket on this problem a long time ago and have seen more like mine show up.  I think the resolution provided was to disable the one of the Adobe plugins.  I have forgotten which one.   I tried that ... maybe it worked I don't recall but I don't want those plugins to be disabled because that forces me to another browser to look at sites that use the plugin.  I've stuck with mozilla based browsers for a long time ... I think I might have been one of the first netscape users ... and I just hate to give up and use Explorer exclusively, but this problem might drive me to so that if it doesn't get fixed pretty soon.

Comment 28

4 years ago
It's a pain for sure. When I open a new window what I try to remember to do is grab the title bar, click, and move it around a bit. If I forget, which is most of the time, I click on the window that fell to the back.

Possibly a timer could be used. A value could be put in about.config to adjust the delay. The timer needs to fire after the flash plugin becomes active. If there's an activate event for the plugin in firefox, and if it's a new window, the window could be made active again.

I hate tabs and don't use them, so I would like to see the problem go away. Yes I did think about using IE, but firefox has too many customizations I need.
Duplicate of this bug: 793843
Duplicate of this bug: 855313
Duplicate of this bug: 855915
Duplicate of this bug: 858838
Duplicate of this bug: 861086

Comment 34

4 years ago
What the **** is going on with this bug?  It's been almost a YEAR now, and millions of users are having their windows jacked around bc Mozilla and Adobe are too lazy to get together and fix this issue.

Comment 35

4 years ago
I'm very appreciative to have Firefox, and free too! The problem still needs to be fixed though. I hate to think it will always be this way.
No longer blocks: 833048

Comment 36

4 years ago
This is a huge issue as it hurts accessibility. How can we keep up with 508 requirements. You must fix this ASAP. It is a huge problem.

Comment 37

4 years ago
This problem is reported on the SuMo forum regularly. I usually refer posters to this summary with workarounds: https://support.mozilla.org/questions/955659 Disabling protected mode works, but is a complex operation for many users.

Adobe has closed its Bug 3223393 with a "Defer" status (at least as early as a February 5, 2013 comment), putting the ball back in our court. Is there really nothing Firefox can do to prevent plugins from changing the active Firefox window?

Comment 38

4 years ago
Not only is it a complex operation, I assume disabling a protection also means dropping part of the security that's enabled by default to actually protect you against nasty stuff in the first place. I think a lot of users have no idea how big the impact of such a 'workaround' could be.

On 22 april, Jing Chen of Adobe commented on the Adobe bug: "Issue added to high votes list."

If I'm reading the explanation of the 'Defer' status right, it only means the priority isn't high enough for a fix -in the next version- and that it will be looked into once the priority is high enough.

So I think it's best that everyone who encounters this bug and acknowledges it's a big usability/productivity problem, votes for the Adobe bug so that it will end up on the priority list there - at the people who are responsible for the bug in the first place.

Is there anyone at Mozilla who's contacted Adobe on this? You would assume there's a point where it's pretty clear the 'workaround' for this is hurting security/safety, and continuing as it was is hurting Firefox usability and its reputation.

Comment 39

4 years ago
With each version of Firefox I hope the bug will be fixed. It may be the principle involved for Firefox developers. Why should they code around an Adobe problem, especially when Flash is buggy anyway? I understand that. But at the same time Firefox should work well, which is their concern. Maybe they all use tabs and not windows, so don't see how bad it is. Yes, I could fix it myself. I could spend however much time researching and reading Firefox code to come up with a solution. But I've never looked at Firefox code and am not going to. I will continue waiting patiently for a Firefox person, who should be taking care of such matters, to go ahead and do that. In the meantime I'll put up with the nuisance because I like using Firefox.

Comment 40

4 years ago
Im shure this is an Firefox Problem. If I open the same Pages using IE9 there is no problem to see the Flash videos.

Comment 41

4 years ago
(In reply to Rudolf Krebs from comment #40)
> Im shure this is an Firefox Problem. If I open the same Pages using IE9
> there is no problem to see the Flash videos.

It doesn't prove anything, the Flash plugin for Firefox is not the same as this one for IE.
I love you all very much. This bug is caused by IME initialization in the Flash protected-mode process. We are continuing to work with Adobe to find a workaround for this issue, but at the current point in time have not been able to come up with a workaround that leaves a working IME.

I know this sucks, and I recommend that anyone who finds this especially annoying disable protected mode.

I am going to restrict commenting on this bug to people with Mozilla "editbugs" so that it can remain a useful tracking bug and isn't overrun by advocacy comments.
Restrict Comments: true

Updated

4 years ago
Duplicate of this bug: 897077

Updated

4 years ago
Duplicate of this bug: 905100

Updated

4 years ago
Duplicate of this bug: 898773
Duplicate of this bug: 901879

Updated

4 years ago
Duplicate of this bug: 922041
Duplicate of this bug: 985963
We've been working with Adobe on this and currently we don't know of any way to fix this in Firefox without either breaking IME or causing other intermittent issues. I'm therefore going to close this as INCOMPLETE and hope that Adobe prioritizes a fix.

If somebody has a patch that you believe will help this situation, please let me know and we can either reopen this bug or file a new one blocking this one.
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago3 years ago
Resolution: --- → INCOMPLETE
Created attachment 8481385 [details] [diff] [review]
Possible patch using LockSetForegroundWindow

This patch wraps out of process NP_Initialize calls with LockSetForegroundWindow. This appears to do the right thing.
Attachment #8481385 - Flags: review?(benjamin)
Comment on attachment 8481385 [details] [diff] [review]
Possible patch using LockSetForegroundWindow

QA note: this should have some targeted testing, and perhaps called out to the nightly-testers list after it lands. We should make sure that the common plugins (flash/silverlight/java/unity/etc) still behave reasonably.
Attachment #8481385 - Flags: review?(benjamin) → review+
liz, NI for a QA contact.
Status: RESOLVED → REOPENED
Flags: qe-verify+
Flags: needinfo?(lhenry)
Resolution: INCOMPLETE → ---
Fabulous, Benjamin and Aaron! I'll pass it along to Nightly-testers and testdays once it lands.
QA Contact: bogdan.maris

Comment 54

3 years ago
I think that patch needs to be tested with protected mode disabled in Flash:
https://forums.adobe.com/thread/1018071
https://hg.mozilla.org/integration/mozilla-inbound/rev/b3f0f2be0ab6
The bug here isn't seen without protected mode. Feel free to test in that mode if you want, but it's not the default nor is it likely to regress.
https://hg.mozilla.org/mozilla-central/rev/b3f0f2be0ab6
Assignee: nobody → aklotz
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34

Updated

3 years ago
Duplicate of this bug: 812892

Comment 59

3 years ago
I can confirm that his fixes the issue, including that this issue does not happen if protected mode is disabled.

I have also verified that silverlight and java still work.  Haven't tested unity, because I don't use that (someone else can test).

Tested build (on Win 8.1):
https://hg.mozilla.org/mozilla-central/rev/1db35d2c9a2f
Verified that using latest Nightly 34.0a1 (buildID: 20140831030206) on Windows 7 64bit the focus does not change anymore on a nonplugin tab/window/private window. 
Plugins used :
- Unity, Flash, Java, Silverlight, Windows Media, Quicktime, Shockwave, Adobe Acrobat, Google Talk.
Status: RESOLVED → VERIFIED
status-firefox34: --- → verified
Comment on attachment 8481385 [details] [diff] [review]
Possible patch using LockSetForegroundWindow

Review of attachment 8481385 [details] [diff] [review]:
-----------------------------------------------------------------

Aren't there possible effects on other applications here, especially with slow plugin startups?
(In reply to Georg Fritzsche [:gfritzsche] from comment #61)

> Aren't there possible effects on other applications here, especially with
> slow plugin startups?

If I understand correctly, you'd need to click-to-play to enable those (Flash is the exception). But yes, from my reading of this patch, if one of those plugins hangs on startup or is very slow, Firefox will be stuck in the foreground for the duration. If that turns out to be an issue, maybe can we time-limit this or limit it to Flash specifically?
Depends on: 1061257
Good point, i've filed bug 1061257 on at least limiting this to Flash.
We also have a few other whitelisted plugins and you still have the same issues once you start them.

I'm still concerned about affecting other applications on Flash loads here; from my understanding we're mostly moving the problem around?
Release Note Request (optional, but appreciated)
[Why is this notable]: This fixes an annoying UI issue that frustrates many users.
[Suggested wording]: Improved plugin startup on Windows to prevent a foreground Firefox window from losing focus.
[Links (documentation, blog post, etc)]:
relnote-firefox: --- → ?
Duplicate of this bug: 815054
Duplicate of this bug: 842573
This patch that was supposed to fix the 'focus stealing' has made those of us who use Flashblock Addon 1000% worse than the original bug because every page that has flash is now losing focus when navigating link on page.

With just short of 1 million Flashblock users (according to AMO), this is going to become a major issue once it hits release.  

I have no idea if something could be changed in Flashblock to get around whatever is happening.  I would no idea what/how as I'm not a coder.

Comment 68

3 years ago
Is there a bug filed about the Flashblock issue after this bug landed?
(In reply to Loic from comment #68)
> Is there a bug filed about the Flashblock issue after this bug landed?

No, not filed one yet and I've not seen anyone else having the problem.  

currently in process of building up a whole new profile.  May not be an issue here at all since no one else I've talked to is having any problems.

Sorry for noise.  Will file if I don't get anywhere with a new profile.

Comment 70

3 years ago
I remember to read a message about this issue on http://forums.mozillazine.org/  a few days ago, maybe it was you. :)
If you're able to reproduce it with a new test profile (+Flashblock), could you open a new bug, please.
Depends on: 1063949
(In reply to Loic from comment #70)
> I remember to read a message about this issue on
> http://forums.mozillazine.org/  a few days ago, maybe it was you. :)
> If you're able to reproduce it with a new test profile (+Flashblock), could
> you open a new bug, please.

Filed bug 1063949

Updated

3 years ago
Depends on: 1063974

Updated

3 years ago
Depends on: 1063978
Can anyone verify that Flash Player 15 fixed this bug on Firefox 32 or 33?
I've got a private mail saying that Flash Player 15 fixed the bug on Firefox 31.
Bogdan, can you verify that the issue is fixed with Flash 15 (15.0.0.152?) on Firefox <34?
If we can get the fix verified then we can back out the fix we have here on our side.
Flags: needinfo?(bogdan.maris)
Unfortunately I got another report that Flash Player 15 did NOT resolve the problem on Firefox 32 :(
I am not able to reproduce this issue on Firefox 32.0.1 RC and Firefox 33 beta 2 using Flash (15.0.0.152) so the issue is fixed for me.
Flags: needinfo?(bogdan.maris)
Sorry about the restricted commenting here, i think i commenting on a closed bug is restricted to certain users only.

So from my mail i see confirmations of the fix for Firefox 31 & 32.
I also see a report of focus issues still happening if you're running more than one Firefox instance.

Masatoshi, did you get any other reports of breakage from running only one Firefox instance?
(In reply to Georg Fritzsche [:gfritzsche] from comment #77)
> Masatoshi, did you get any other reports of breakage from running only one
> Firefox instance?

No.
I got two more reports saying that the problem was fixed on Firefox 32 with Flash Player 15 (not sure about the instance count).
(In reply to Bogdan Maris, QA [:bogdan_maris] from comment #76)
> I am not able to reproduce this issue on Firefox 32.0.1 RC and Firefox 33
> beta 2 using Flash (15.0.0.152) so the issue is fixed for me.

Just to be clear, I used Flash 14.0.0.179 version to reproduce the issue on the same builds.

Then tested using Flash 15.0.0.152 version:
I tried using two windows on the same instance (normal or private) and the focus stayed where it should, also using multiple instances of the same Firefox build or different (normal or private) with the same result (focus stays where it should).
In light of the release of Flash 15 and confirmation that it takes care of this issue on Firefox 32, I've filed bug 1066182 to back this patch out.
Blocks: 1066182
Comment #75 was reported from Eduard Braun. According to bug 1066182 comment #3, it was false positive.
Clearing relnote-firefox as this patch has been backed out.
relnote-firefox: ? → ---
Flags: needinfo?(lhenry)
See Also: → bug 764390
No longer depends on: 1063949
Blocks: 1057654
You need to log in before you can comment on or make changes to this bug.