Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Firefox - Javascript prevents me from closing tab - security vulnerability - installs malware or just annoying

  • 4 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 FredMcD

more options

Some times a website hijacks your tab and won't allow you to close it unless you choose an option. If you choose yes or no then it install a virus or malware.

In chrome you can just hold enter and then close window and if force closes browser window. Only option is to force close the entire browser window via the task manager or agree to the terms.

I believe javascript should not prevent you from closing the browser tab/window or at least write an internal over ride that will terminate any script running in the browser in the current tab. Otherwise why did I choose to close it in the first place.

There might be legitimate reason to allow this but you should offer an override. Also from a user stand point there are many people out there that have little to no information about how a browser or tech works. Someone like my dad who is over 50 years old and struggles to us the internet or smart phone. He would not know how to deal with this. Thus would end up installing the virus.

Anyway I have yet to see anywhere this is a useful feature. Mostly used on bad websites. I don't want to disable javascript for the browser. I just want close a tab.

just before submitting this I encountered one window that if closed it would open up 2 more tabs. All with the same problem.

So if I was going to code this I would code as some kind of button you hold down on the keyboard or right click and then terminates the script in the tab and then closes the tab. Like force quit a program.

Some times a website hijacks your tab and won't allow you to close it unless you choose an option. If you choose yes or no then it install a virus or malware. In chrome you can just hold enter and then close window and if force closes browser window. Only option is to force close the entire browser window via the task manager or agree to the terms. I believe javascript should not prevent you from closing the browser tab/window or at least write an internal over ride that will terminate any script running in the browser in the current tab. Otherwise why did I choose to close it in the first place. There might be legitimate reason to allow this but you should offer an override. Also from a user stand point there are many people out there that have little to no information about how a browser or tech works. Someone like my dad who is over 50 years old and struggles to us the internet or smart phone. He would not know how to deal with this. Thus would end up installing the virus. Anyway I have yet to see anywhere this is a useful feature. Mostly used on bad websites. I don't want to disable javascript for the browser. I just want close a tab. just before submitting this I encountered one window that if closed it would open up 2 more tabs. All with the same problem. So if I was going to code this I would code as some kind of button you hold down on the keyboard or right click and then terminates the script in the tab and then closes the tab. Like force quit a program.

所有回覆 (4)

more options

hello samsoundguy, i agree that this should not be allowed to happen - could you file a bug report for this issue including the offending url at [bugzilla.mozilla.org]? thanks a lot!

more options

Chrome currently creates a separate process (you can see it in the Windows Task Manager) per window or per tab. That makes the killing of a single window or tab separate from the rest of the windows and tabs. Firefox has a feature in development that will spawn separate content processes, but it's taking time to get the kinks out: https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox While that means some delay before your suggestion could be implemented, it also means an opportunity to make sure it is fully featured when it arrives.

more options

You can also possibly set the dom.disable_beforeunload prefto true on the about:config page.

You can open the about:config page via the location/address bar. You can accept the warning and click "I'll be careful" to continue.

more options

This add-on can stop such pages; disallow Script Button {web link} The Disallow Script button looks like a letter "M" and the title is the Minus Script, drag and drop the button on a toolbar. If the button is not displayed then nothing operates, except rules for plugins.