Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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;