Merge in a window opened with JavaScript's "window.open()"

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Post Reply
Gary King
Posts: 983
Joined: September 5th, 2003, 9:27 pm

Merge in a window opened with JavaScript's "window.open()"

Post by Gary King »

If I click a link on a website, which opens a new window with JavaScript's "window.open()" function, and it has small dimensions like 250 px by 100 px or whatever, then how can I merge it back in to my main Firefox window? I can't really drag anything because it doesn't have a tab bar, like I can with most links that open in a new window.

EDIT: I'm not sure why this thread was moved to the web development forum. It's related to Firefox functionality (merging windows by dragging tabs into another window), not how websites function. It's not really a JavaScript-related question, and more of a Firefox-related one.
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Merge in a window opened with JavaScript's "window.open(

Post by jscher2000 »

When window.open() uses certain features, it is not treated as an ordinary window but as a dialog-style window. For example, it can't have additional tabs. I once posted a Greasemonkey userscript that would reload the page in a normal window, but that is an extra step and depending on the site might not always work.

http://userscripts-mirror.org/scripts/show/101728.html

Since that is a mirror site that tried to rescue all the content of userscripts.org, I'm not sure whether it's a correct copy of the original.
Gary King
Posts: 983
Joined: September 5th, 2003, 9:27 pm

Re: Merge in a window opened with JavaScript's "window.open(

Post by Gary King »

Thanks, that's a very helpful reply. Unfortunate that Firefox can't provide a way to override the dialog nature of these windows. I like it when I click on a tab that opens a new window, and Firefox forces it into the current window. I wish the same could be done for window.open() as well.
Post Reply