Closed Bug 840649 Opened 11 years ago Closed 11 years ago

open url in new window loses focus win 8 only

Categories

(Firefox :: Untriaged, defect)

18 Branch
x86
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 768802

People

(Reporter: david, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.2; rv:18.0) Gecko/20100101 Firefox/18.0
Build ID: 20130201065344

Steps to reproduce:

Right click on URL, choose open in new window.


Actual results:

New window opens, but focus goes back to previous window after page loads. If I remember to click inside new window before it closes it may retain focus, but not always. If I click and move with title bar it will retain focus. Google search set to open in new window by default so no right-click needed. Those pages lose focus when opened with left-click, also. Happens on all machines upgraded to Windows 8 both 32 and 64. Several machines upgraded and all do the same thing and the new window always loses focus. Tried XP machine and does not occur with same version of Firefox. Tried Internet Explorer and does not occur. Similar issues were seen for Firefox but many years ago. Began happening immediately with Windows 8 upgrade with Firefox version 18.0. Continues with versions 18.0.1 and 18.0.2.


Expected results:

New window should have retained focus.
change "inside new window before it closes it may retain" to "inside new window before it loses focus it may retain"
Is this happening with all opened pages or only some ?
Does it work if you disable the flash plugin in the add-on Manager ?
I did more testing. Happens reliably when light pages are used without many images. If pages took a long time to load the new window would retain focus. Tried with several pages open and the new page will lose focus. Tried disabling the flash plugin and the problem went away. Disabled, closed Firefox, opened Firefox and did test. Did same in reverse and problem reappeared. Problem starts appearing as soon as flash is enabled without closing Firefox. The best test was to go to google.com and type "happiness" in the search box and open one of the links in a new window.
Does this happen only if the flash plugin is launched / does it work if you already have a window open with flash ?

That would be a dupe of bug 768802
I looked at bug 768802 which does not cover the same problem in my opinion. One may infer that, but 768802 speaks of three flash processes. In my description I said I disabled a single flash plugin. That's all I have in my Firefox. When disabled the problem does not occur. None of the pages I tested have flash content. The flash plugin must have a hook in page events simply because it is enabled, though not even rendering flash content on the page. Bug 768802 talks about Windows 7. I had Windows 7 on my laptop and never experienced the problem I am describing, though did begin experiencing the problem after updating to Windows 8.
>None of the pages I tested have flash content
Are you sure ?
Please, as always in a bug report, provide an example URL.

> The flash plugin must have a hook in page events simply because it is enabled
No, that is not possible. The flash plugin process gets only launched if there is an embed or object tag on one page and it doesn't do anything if Flash is not started.

> Bug 768802 talks about Windows 7. I had Windows 7 on my laptop and never 
>experienced the problem I am describing
The flash plugin has a "protected mode for Firefox" and they are doing some weird focus stuff due to that feature. It can happen on every windows version but a changed Windows version can be enough to trigger the issue.
I can for example reproduce the issue on my Windows7 installation with Seamonkey.

>When disabled the problem does not occur.
Now check if the focus issue happens if you have a Firefox window in the background with flash (e.g. youtube). bug 768802 only happens if the Flash process starts.
I use the flash-block addon which prevents flash from being loaded on pages unless the flash-block widget is clicked. I haven't analyzed the functionality of it to see if it edits the HTML stream to remove flash references, but I assume it does. For testing I tried with and without flash-block installed. If I go to https://www.google.com/search?hl=en&newwindow=1&safe=off&tbo=d&site=&source=hp&q=Happiness I am sure there is no flash on the search result page. On the link "Quotes about Happiness" if I right-click and open in a new window I am taken to http://www.goodreads.com/quotes/tag/happiness and there is no flash on that page either . The page quickly loses focus and the previous page is given focus. I experimented with other combinations, loading one page and launching another. Concurring with my previous posting this happens most reliably with lightweight pages that don't have many images or other content, maybe a lot of text. Heavier pages take longer to load which may indicate a timing parameter. If the new page takes long enough to load an event hook may be deleted or replaced. I still think just the presence of the flash plugin changes the dynamic, though the plugin is not activated with flash content.
I was wrong about the "Quotes about Happiness" link. Yes it does have flash on it. But since flash-block is used there is no flash. I could do trial and error until I found one from the google search page without flash, but you get the point.
(In reply to David McDivitt from comment #7)
> I use the flash-block addon which prevents flash from being loaded on pages
> unless the flash-block widget is clicked. I haven't analyzed the
> functionality of it to see if it edits the HTML stream to remove flash
> references, but I assume it does. For testing I tried with and without

Just check if the flash process is started in the task manager ?
I'm pretty sure that it appears there or you would not get the issue.
Another option would be a flashblock bug which would make this bug report invalid.
I didn't think to check if the flash player appears in task manager. So, while watching the task manager go to google.com. No flash in task manager. Right click and open in new window for any link at the top of the page. "Maps" does not have flash because it does not show in task manager. "Play" does have flash, it shows in task manager, and the page loses focus. So you are right about flash activating and causing the page to lose focus. That was a nice assessment. Maybe this can be passed on to Adobe.
Thanks for confirming that this is a dupe of bug 768802 :-)
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.