Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Obligatory dogpile, but I'm hoping for the day you can disable Ctrl-Q to prevent accidentally closing the browser with a single keystroke. It's impossible to do on Linux.


Good timing! I actually fixed this 21 year old feature request: https://bugzilla.mozilla.org/show_bug.cgi?id=52821

You can set browser.quitShortcut.disabled=true in about config starting with Firefox 87.


Much appreciated! Figures that it was a 21-year-old bug. I'm wondering why it took so long, but regardless, you're my savior.

Coincidentally, when Mozilla's blog post about shipping a big cookie separation feature was on the front page recently, the first thing I thought was "but when will they let you disable CTRL+Q? It'd be so much easier to do than this." In the age of Chromium, issues like this will lead to death by a thousand cuts for Firefox. The cost of switching is marginal for most people, as Chrome has become too well-architected as a browser which ends up connecting you to Google. I myself was almost tempted to switch because of this and other relatively minor issues that ended up snowballing together, and I'm a person that makes a deliberate effort to like Firefox. I have to wonder why nothing changed in 2002, when so many people were making so much noise about this.


Whoa, that is incredible, thank you SO MUCH! <3

I don't think I can explain the extent to which this simple papercut has been vicious and painful to me.

So many times, I've started writing some long post in a text field and accidentally lost it due to pressing some wrong keyboard shortcut (oops, you pressed backspace outside a text field! oops, we bound this key to 'reload the page', oops you closed the form by pressing ESC!). It's always a particular type of sinking feeling to have to start writing all over again.

Now there are extensions for this, and some of them even work. But what's my natural instinct when I have data in a text field I really don't want to lose because I would feel terrible losing it?

Well, ^A ^C and go paste it in a notepad, maybe even finish editing it there.

... and then Firefox quits, maybe because my layout switched between AZERTY and QWERTY by accident, maybe because my finger slipped between A and Q. And I get to stare at my desktop, crushed and defeated, having lost my data at the exact worst possible time...

I was seriously starting to consider maintaining my own Firefox fork, and I _cannot thank you enough_!


Fixing the Ctrl+Q issue is great, but I still think extensions such as Form History Control are essential for all other situations. I'd very much appreciate if Mozilla could vet it for security; I'm always afraid of some developer selling out or being hacked and a future update introducing a backdoor.


> So many times, I've started writing some long post in a text field and accidentally lost it due to pressing some wrong keyboard shortcut (oops, you pressed backspace outside a text field! oops, we bound this key to 'reload the page', oops you closed the form by pressing ESC!).

For me it's often ctrl+w to delete one word, which terminals have gotten me used to. I don't want the shortcut removed because I use it all the time to close tabs outside a text box, but it also still working while focused in one is annoying.


Oh god yes, backspace outside the text box is the worst. Some websites mitigate this themselves, but it would really be nice if the browser could take care of this.


Firefox already lets you disable that using the browser.backspace_action setting in about:config: https://support.mozilla.org/en-US/questions/924490


I can't find any words to tell you how thankful I am!

My FF is configured to delete all history upon exit, so I have lost SO MANY interesting browsing sessions over the years due to CTRL+Q!

Thank you very much for finally resolving this!


Not a bug I personally was very affected by, but:

Thank you so much fpr actually fixing bugs!

If my impression of Mozilla is correct you must have both done the work and possibly also fought hard to be allowed to merge it.

(Now, if any Mozillan feel inspired I'd love to get my real extensions back, particularly TST without top tab bar and also Scrapbook.)


Awesome, thank you. This will fix most of my accidental firefox closing. Too bad that I sometimes fatfinger ctrl-w as ctrl-shift-w.


oh wow!! that's amazing, i've been waiting for this one forever.


I'm not sure if it's an option in the settings now or not but if you go to `about:config` in firefox and search for `browser.warnOnQuit` you can make sure that's set to `true`.

Another favorite of mine: `browser.tabs.closeWindowWithLastTab` set to `false`. This lets me cmd-w as many times as i want but it won't close the window I have open.


That has bit me so many times. Especially since Q is right next to W. Trying to close a tab with Ctrl-W and accidentally hit Q :(


It's partially fixed now, it'll show the "Quit and Close Tabs" dialogue now if you check "Warn you when quitting the browser" in the preferences.


For anybody using MacOS, a keyboard customisation program called Karabiner-Elements can help here. By importing a specific KE rule, you can change the behaviour of your keyboard such that a Cmd-Q code is only sent after pressing the key chord twice. IRL this translates into a singular press and hold of Cmd and a double tap of Q and it works on all programs. I can't recall accidentally closing any program since enabling this rule and it takes next to no extra effort to work with it enabled.


Yeah Chrome's "hold to quit" feature is genius. I wish VSCode had it too.


Uggh. I pretty much never use Chrome on my Mac, but when I borrow someone else's computer and want to quit Chrome I always get bit by this one! No other application have I seen that makes you hold down ⌘Q to quit, except for Chrome. This is not conventional on Mac apps! It's probably configurable but why make it the default?


Because nobody would know it even existed if it wasn't the default and it's a great feature!


You can hack it in VSCode by turning on the warn-before-terminal-closed feature, and making the terminal always load.

Only drawback (maybe) is that every open project in VSCode warns when trying to close the entire app.


I'm on mac, but I used to have the same problem also in other apps: I use a system wide app that makes you long press cmd-Q to quit any app (with an allow/block list): "SlowQuitApp". Just in case you never thought to try to find something similar (assuming ctrl-q is a common shortcut in linux, I forgot)


I did actually use this when I used macOS, but when I moved to Linux there was apparently no equivalent at the time.

https://superuser.com/questions/1318336/how-to-disable-ctrlq...


IMO this should be a feature of the window-manager, not the application. But that requires a change in the interface between window-managers and applications, to allow the window-managers to be more heavy-handed. Which I've wanted for a very long time.


Funny enough, that's basically the direction both Mac OS and Windows take things. On Linux, X11 is the norm and window managers do very little other than add decoration around a rectangle.

Wayland probably providers tighter coupling, but then you'll need cooperation with applications... GNOME has gone toward this direction, but applications not developed by GNOME basically ignore their efforts to make applications and window manager feel like a cohesive whole.


I was a Firefox user from the Phoenix/Firebird days and I keep trying to make it my primary browser again and reduce my Chrome usage to fight the monoculture. I am probably about 50/50 between them. One of the few Chrome plugins I use is QuickTabs and I it is bound on ctrl-q ofcourse. That works out about as well as you would expect.

Firefox is still a fantastic browser but it can be frustrating in many small ways.


On Fedora Chrome disables Ctrl+Q and Chrome can only be closed by going through the menu. Maybe Chromium implements it too, then you could find out the trick in the source.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: