Search Support

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.

Learn More

warn on quit

  • 7 odgovori
  • 1 ima ovaj problem
  • 13 views
  • Posljednji odgovor poslao exekutive

more options

It's so frustrating that the keyboard shortcut for closing tabs is right beside the one to quit Firefox. I've lost countless hours because of this, and it's so easy to accidentally do. Is there a way to keep this from happening? A simple "Are you sure" confirmation dialog would be great, or I really like the Chrome "hold command-Q" to exit feature. This seemingly simple function is proving extremely difficult to accomplish.

Yes, I'm aware of session restore, but (1) It does not preserve my window arrangement. I use multiple desktops for various tasks, and they each have related browser windows. (2) I need to see webpages exactly as they were when I opened them. Sessions expire, dynamic pages are refreshed, content is removed etc. That is all lost.

I do not want to disable session restore completely. It can still be useful. But, I do not want to trigger session restore automatically every time. Manual activation is ideal.

regarding: "browser.tabs.warnOnClose" I do not want a warning for closing multiple tabs. I often have many windows open and that warning gets annoying. It also doesn't prevent me from accidentally quitting when I only have one tab open.

I tried setting browser.warnOnQuit to true, but it's ignored.

I simply want a confirmation when I use the keyboard shortcut to QUIT. That's it. No side effects. Can Firefox do this?

All Replies (7)

more options

I guess I'm alone. Back to Chrome it is.

Helpful?

more options

On Mac disabling key_quitApplication doesn't seem to be easy as this seems to be under control of the Mac OS.

# On OS X, dark voodoo magic invokes the quit code for this key.
# So we're not adding the attribute on OSX because of backwards/add-on compat.
# See bug 1369909 for background on this.

On Linux I run this code in the Browser Console to disable the Ctrl+Q shortcut for the current window, but this will likely have no effect on Mac

javascript:(function(){
var wd = Services.wm.getMostRecentWindow("navigator:browser").window.document;
function $(e){return(wd.getElementById(e))}
function $(e){var N=$(e);if(N){N.removeAttribute("command"); N.removeAttribute("key"); N.removeAttribute("modifiers"); console.log(N)}return($(e))}
$("key_quitApplication");
})()

Helpful?

more options

Chrome managed it somehow.

Is there at least a way to assign a different shortcut key to close tab so it's not so close to the 'q'? This is an almost daily rage moment for me.

Helpful?

more options

Did you try the code in the Browser Console to see if it has any effect ?

To enable the command line in the Console:

Helpful?

more options

It just does this

Uncaught ReferenceError: Services is not defined

   <anonymous> debugger eval code:2
   <anonymous> debugger eval code:6


Besides, I don't want to disable it for just the current windows. I want to disable it for the entire application.

Helpful?

more options

Are you possibly running the code in the Web Console ?

Like I wrote above, you need to run the code in the Browser Console.

Helpful?

more options

Browser console

Uncaught InternalError: too much recursion

   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4
   $ debugger eval code:4

Helpful?

Postavite pitanje

Morate se prijaviti na račun da biste odgovarali na poruke. Molimo postavite novo pitanje, ako još uvijek nemate račun.