Closed Bug 357853 Opened 13 years ago Closed 13 years ago
if no browser window exists, "-new-tab <url>" commandline argument does not open <url>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1) Gecko/20061010 Firefox/2.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1) Gecko/20061010 Firefox/2.0 when passing the commandline argument "-new-tab <url>" to firefox, the <url> will not be loaded if there is no existing browser window (browser window being the main window (tabs, webpages etc)). the same thing happens if the download/addon/etc window(s) are open, but there is no existing browser window. the result of passing the "-new-tabs <url>" commandline argument to firefox in these cases results in a browser window being opened to the default home page; the <url> is not loaded. Reproducible: Always Steps to Reproduce: 1. close all firefox main browser windows (you can leave the download/addon/etc windows open if you like) 2. run firefox with the "-new-tabs <url>" commandline (replace <url> with your favourite url ;) 3. watch your home page appear :( Actual Results: new browser window is created containing the users home page Expected Results: a new browser window should appear that contains the <url> specified on the command line
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
i get this too!
handURIToExistingBrowser() tries to use cmdLine (if getMostRecentBrowserWindow() returns null), but it isn't defined.
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #243392 - Flags: review?(benjamin)
Target Milestone: --- → Firefox 3 alpha1
patch works here
Checked in on the trunk. mozilla/browser/components/nsBrowserContentHandler.js 1.29
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Comment on attachment 243392 [details] [diff] [review] patch This fix only affects -openURL(<url>,new-tab) and -new-tab command line parameters. The risk of regression is nearly 0 (passing an extra argument to a function that already uses it to avoid throwing an exception).
Attachment #243392 - Flags: approval220.127.116.11?
Comment on attachment 243392 [details] [diff] [review] patch approved for 1.8 branch, a=dveditz for drivers
Attachment #243392 - Flags: approval18.104.22.168? → approval22.214.171.124+
Verified using steps in bug description with: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199pre) Gecko/20061130 BonEcho/188.8.131.52pre
Comment on attachment 243392 [details] [diff] [review] patch This should land on the 1.8.0 branch too, it's a simple fix that causes headaches for linux users.
Attachment #243392 - Flags: approval184.108.40.206?
Comment on attachment 243392 [details] [diff] [review] patch Approved for 1.8.0 branch, a=jay for drivers.
Attachment #243392 - Flags: approval220.127.116.11? → approval18.104.22.168+
Verified 22.214.171.124 using steps in this bug description with Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:126.96.36.199pre) Gecko/20070207 Firefox/188.8.131.52pre ID:2007020706
You need to log in before you can comment on or make changes to this bug.