Last Comment Bug 644729 - Popup window with all toolbars visible causes new tabs to open in another browser window
: Popup window with all toolbars visible causes new tabs to open in another bro...
Status: RESOLVED FIXED
fixed by bug 485237
:
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: 4.0 Branch
: All All
: -- normal with 4 votes (vote)
: Firefox 12
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 485237
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-24 12:49 PDT by joe.carter35
Modified: 2012-02-01 13:57 PST (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description joe.carter35 2011-03-24 12:49:58 PDT
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0

I'm not sure if this is a bug or whether it's meant to run like this. 
Basically, if I have two FF windows open, and one has a few tabs running and the other deosn't, if I right click a link in the window that hasn't many tabs, the link will open up in a tab in the other window. At first I didn't even realise this was happeing, and kept on clicking 'Open link in new tab' When I switched to the other window I realised that they'd all been opening in that window.

Hopefully this is a bug that can be fixed. Thanks for a great browser on the whole!

Reproducible: Always

Steps to Reproduce:
1. Have two FF windows open at one time, the first with lots of tabs, the second just one.
2. On the second FF window, right click on a link and press 'Open link in new tab'
3. Change back to the other window and there is the new tab.



Standard FF 4 theme
Comment 1 Ed Morley [:emorley] 2011-03-24 15:46:56 PDT
Could you see if the issue occurs if using Firefox in safe mode:
http://support.mozilla.com/kb/Safe+Mode

How about with a new, empty testing profile? (Don't install any addons into it)
http://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile
Comment 2 Vlad [QA] 2011-03-28 08:14:11 PDT
Works for me on Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0
Comment 3 wendelj 2011-04-08 20:29:03 PDT
Useragent: Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0
Issue Occurs in Safe Mode as well with an empty profile.

I've only seen this happen when the Javascript is used to open the new window so far.

To reproduce:
1. Go to this URL (or any other that uses window.open JS method):
http://www.javascript-coder.com/files/window-popup/javascript-window-open-example1.html

2. Click on "Open the JavaScript Window Example 1"

3. Try to open a new tab in the new window from any of the links on the page that's displayed

The new tab will open in the previous window instead.
Comment 4 Henrik Skupin (:whimboo) 2011-04-11 13:45:21 PDT
(In reply to comment #0)
> 2. On the second FF window, right click on a link and press 'Open link in new
> tab'

Joe, is this second window a popup? If yes, that is an expected behavior made by bug 606678.
Comment 5 Ginn Chen 2011-04-13 13:04:08 PDT
I understand the expected behavior by Bug 606678 for popup window.

But the problem is what if the popup has locationbar, scrollbar, toolbar, menubar and a normal window size.

How can the user tell this is a popup?

The even worse thing is user can press CMD+T to create a new tab in this "popup" window.
Then the user start to browse some other sites in the new tab and right click a link to open in a new tab.
Surprise, the new tab is opened in another window.

Bad UX.

Try http://www.webdevelopersnotes.com/tutorials/javascript/creating_opening_new_window_pop_ups_javascript.php3
The link under "This window has the menu and the status bars.".
This example opens a small window, so you can tell this is a popup, some sites will not set the size.

I hit this problem myself from yahoo fantasy baseball, my team page, click any game time to open a game preview.
Comment 6 Henrik Skupin (:whimboo) 2011-04-13 13:46:14 PDT
Ok, that important information was missing. So it makes sense. Dao, how do we detect if we have a simple popup or a rich window with toolbars visible?
Comment 7 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-05-05 14:29:51 PDT
Dao, any feedback on comment 6?
Comment 8 Dão Gottwald [:dao] 2011-05-05 14:33:34 PDT
(In reply to comment #6)
> Ok, that important information was missing. So it makes sense. Dao, how do we
> detect if we have a simple popup or a rich window with toolbars visible?

We check whether the window's chromehidden attribute is empty. For the popup from comment 3, the value is "toolbar directories extrachrome".
Comment 9 Blc 2011-07-29 12:31:49 PDT
> We check whether the window's chromehidden attribute is empty. For the popup
> from comment 3, the value is "toolbar directories extrachrome".

And is there any way to achieve this "chromehidden attribute empty", if I open window from javascript window.open()?

I have a javascript application where main page remains loaded in one tab and links are opened in new windows. When in one such new window, user usually wants to open links in new tabs. But since Firefox 4, they are opened back in parent window, which is not expected and not wanted and therefore very unfriendly user experience. So these tabs get mixed from many sources, which makes them mess, where there were order in older Firefox. :-(

Example here: http://www.mageo.cz/home/MCA/OpenInNewWindow.html

I understand, that this behavior is intended for small popup windows. But this is another case. IMHO there should be better detection of "popup". Or at least let the web developer to set "old Firefox 3 behavior" for given window through javascript.
Comment 10 Phil Zampino 2012-01-17 07:13:09 PST
I have a many-years-old application that controls bookmarked links, working with a server to store and manipulate the bookmarks from any location.  A javascript application loads those bookmarks and opens links at a user request.  The windows opened are not "pop-ups", they have a location bar, and other common window attributes.  However Firefox now sees these windows as pop-ups, and when opening new links in a tab from the opened window, Firefox performs an erratic selection of what window to open the tab in. 

We will most likely move off of the Firefox platform because of this problem.  I can't see the rationale in disallowing any window to open a tab within its own window.  I agree with the previous poster that allowing Firefox 3 behavior would be a reasonable solution to the problem.
Comment 11 Blc 2012-01-19 10:10:25 PST
(In reply to Phil Zampino from comment #10)
> We will most likely move off of the Firefox platform because of this
> problem.

You can try this add-on which will return old behavior to new versions of Firefox.
https://addons.mozilla.org/en-US/firefox/addon/bug-586234-unfixer/
Comment 12 Phil Zampino 2012-01-24 06:10:21 PST
Unfortunately that add-on is for the Windows platform only.
Comment 13 Phil Zampino 2012-01-24 06:12:00 PST
Apologies, the first time I looked at that add-on it wouldn't install on Mac OSX, but apparently that's no longer the case.  Thanks for the correction.

Note You need to log in before you can comment on or make changes to this bug.