当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

window.open using _blank open in same window

  • 7 件の返信
  • 8 人がこの問題に困っています
  • 1 回表示
  • 最後の返信者: cmd1234

more options

It seems in the latest update when using window.open(url,'_blank') in place of opening the link in a new window/tab, it is opening it in the current tab

It seems in the latest update when using window.open(url,'_blank') in place of opening the link in a new window/tab, it is opening it in the current tab

選ばれた解決策

We have found a fix to this...

var parentOpener = window.opener; window.opener = null; window.open(url,"_blank"); window.opener = parentOpener;

この回答をすべて読む 👍 0

すべての返信 (7)

more options

Could you please expand on your issue. If possible in point form so that we may help solve your issue.

What is page suppose to open to when start Firefox and is it doing what it you want ? What happens when open a new Tab ? Did you insert the old fix code into about:config ?

So sorta need more information if you would please

more options

A simple bit of java script that has worked for the last 10 years stopped working correctly on the latest Firefox update. The simple use of window.open( URL , "_blank") which will open the link in another tab, has stopped opening another tab and now open the link in the same window as the java script is running in.

more options

Might point out the link dose not return a HTML page, it returns a excel spread sheet.. We send a Json object to the server, it makes a excel spread sheet, and returns a link for the spread sheet, we use the link in window.open to download the spread sheet. In the past it use to open another tab and download the spread sheet it now opens that link in the current tab and not a new one.

more options

cmd1234 said

Might point out the link dose not return a HTML page, it returns a excel spread sheet..

So does window.open(URL, "_blank") work normally for HTML pages, and is broken only for downloads (content Firefox can't display in a tab or which has file-disposition:attachment)?

Test page for HTML: https://jeffersonscher.com/res/popit.html

For downloads: in the old days, you'd get a blank new tab and then Firefox would realize it's a download and close the blank tab. But in Firefox 54 instead of opening and closing a blank tab, do you find that Firefox closes the page you were on?

This thread has that scenario with a possible (client-side) workaround: opening a PDF document closes underyling window (workaround is to disable multiprocess)

Note: I have multiprocess disabled due to one or more of my extensions being incompatible, so I haven't been experiencing this myself.

more options

You can check some prefs on the about:config page if you haven't done this yet.

For links opened via JavaScript you can look at this pref:

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

more options

jscher2000 said

cmd1234 said
Might point out the link dose not return a HTML page, it returns a excel spread sheet..

So does window.open(URL, "_blank") work normally for HTML pages, and is broken only for downloads (content Firefox can't display in a tab or which has file-disposition:attachment)?

Test page for HTML: https://jeffersonscher.com/res/popit.html

For downloads: in the old days, you'd get a blank new tab and then Firefox would realize it's a download and close the blank tab. But in Firefox 54 instead of opening and closing a blank tab, do you find that Firefox closes the page you were on?

This thread has that scenario with a possible (client-side) workaround: opening a PDF document closes underyling window (workaround is to disable multiprocess)

Note: I have multiprocess disabled due to one or more of my extensions being incompatible, so I haven't been experiencing this myself.

opening a normal html page dose work ok. my settings for dom.ipc.processCount was already set too 1 and setting browser.tabs.remote.autostart.2 to false did fix the problem, but we can not tell all our clients to go into about:config and change there browser setting if we are going to tell our client anything it will be go and use chrome in place of firefox, as chrome and safari still work ok.

more options

選ばれた解決策

We have found a fix to this...

var parentOpener = window.opener; window.opener = null; window.open(url,"_blank"); window.opener = parentOpener;