Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

How to stop Safari quitting unintentionally

By: hoakley
1 July 2025 at 14:30

I don’t always hit the right keyboard shortcuts. Of those that I commonly get wrong, by far the most serious are Command-W and Command-Q in Safari. While the former just closes the frontmost window, the latter quits the whole app, and can lose the contents of online forms. Why can’t Safari show a confirmation alert before quitting, so I can cancel those unintentional quits?

No alert is going to stop you from using the wrong keyboard shortcut. All it will do is annoy you every time you want to quit Safari and press the correct keys. At worst, when you press Command-Q but intended Command-W, you’ll accidentally click on the wrong button in the alert and go ahead with quitting Safari. The error isn’t quitting the app, it’s pressing the wrong keys, and you’ll continue to do that unless you train yourself out of it, or change your practice to make it more robust.

Historically, keyboard shortcuts for quitting apps and closing windows have long been set as Command-Q and Command-W, as Q stands for Quit and W for Window. It’s unfortunate that the two keys are immediately adjacent, so making it easy to press the wrong one, particularly if you hunt and peck for keys rather than being a touch typist.

If you’re having this problem in Safari, then you’re most likely doing the same in other apps, although its impact there may not be as apparent. That’s because most other apps track changes made in open documents for this purpose, but that’s not something that Safari can do with web pages, as entering your own text within them is tracked by the remote web server, not the browser. This should be mitigated by any website that you’re entering text into: the server should either record those entries as you make them, or at least give you the option of saving them. That’s a basic expectation of accessible website design.

Solution

You may find it helpful to enable Ask to keep changes when closing documents in Desktop & Dock settings. Coupled with disabling the control below, to Close windows when quitting an application, that should bring more protective app behaviour.

It might seem tempting to try changing the shortcut for Quit, but as far as I can see, you can’t do that for all apps. Changing it for just one or a few introduces a major inconsistency, and only increases the risk of error.

The best way you’re going to address this is to remove its root cause, by not pressing Command-Q when you don’t want to quit Safari, and that requires you to close windows a different way. Readily available in macOS is the choice of:

  • closing windows by clicking on their red Close button at the top left;
  • using the Close command in the File menu;
  • assigning a different key combination, and using that to close windows in all apps.

Although you don’t appear able to change the shortcut for Quit in all apps, you can for Close. Open Keyboard settings, click on Keyboard Shortcuts…, then on App Shortcuts at the left. Click on the + tool to add a new shortcut, and set that for All Applications, with a Menu title of Close, and a shortcut of something like Command-Shift-M. You may find Apple’s list of keyboard shortcuts helpful to ensure there are no conflicts. Whichever you choose, you should apply it consistently across all your apps. This keeps it standard and simple and makes it automatic.

Of those three options, my preference is invariably for the first, using the window’s Close button. That’s because it works independently of whichever window is at the front and ‘in focus’. With a little care checking which window you apply it to, it should be completely free of error. The disadvantage of both the Close menu command and its shortcut Command-W is that you might have a different window in focus, so sometimes you will end up closing the wrong one by mistake.

Training

Once you have chosen which to use, train yourself rigorously to use that, and that alone. When working with single-window apps you have the choice of using either, and you should consciously go through the process of thinking that through before deciding which control to use, to remind yourself of what you are doing and why.

The goal is to make closing windows and quitting apps, including Safari, thoroughly reliable processes, so you never make a mistake. That makes any warning alert superfluous, and you’ll then agree that it would only serve to irritate. That’s why better interface guidelines caution against displaying an alert unless there’s a compelling reason to do so, and not routinely whenever quitting an app.

A brief history of hardware epidemics

By: hoakley
21 June 2025 at 15:00

Living creatures aren’t the only things to be ravaged by epidemics. Computers, even Macs, can die prematurely when there are widespread manufacturing failures. I’d like to unearth a couple of mass graves from the past that have surely contributed to landfill around the world: capacitor plague and lead-free solder, and a recent problem with butterflies.

Capacitor plague 1999-2007

Capacitors or ‘caps’ have a chequered history. Acting as temporary stores of electric charge, they’re used extensively in most computer hardware and other equipment, such as ‘starters’ or ‘ballast’ for fluorescent tube lighting. They consist of conductive materials sandwiched with substances of low conductivity, or electrolyte. When manufactured to high standards they should last for 15 years or more, but cheap components are prone to overheating, electrolyte leakage, and in the worst case even fire.

With manufacturing driven to minimise the cost of components, some who procured supplies of capacitors have saved a few pence using cheaper sources. Many have turned out to be duff, so-called counterfeit capacitors: in the early years of this century, a series of fires in mainly industrial and commercial premises were blamed on catastrophic failure of strip light ballasts.

Computer motherboards and other components, including some batches of iMac G5 and eMacs, have also suffered ‘capacitor plague’ when counterfeits have somehow entered the assembly plant. Since first reports in 1999, successive waves have cost major manufacturers hundreds of millions of dollars to rectify.

An ABIT VP6 motherboard with a blown capacitor alongside others that are bulging or leaking (2007). Image by Ethanbrodsky, via Wikimedia Commons.

This PC motherboard from ABIT has one blown capacitor obvious just to the left of centre, among others that are starting to bulge and leak.

Fortunately, Apple’s products were among the least affected, and since 2007 very few problems have been reported, although failed capacitors and leaky batteries remain problems in any computer over 15 years of age.

Lead-free solder 2006-2017

No sooner was capacitor plague dying out than a new wave of failures was reported, mainly affecting better graphics cards, including some installed in various models of Mac. The most prominent was probably that in 2011 MacBook Pro models, but several other MacBook Pros, iMacs, and others were affected. My own iMac 27″ Mid 2011 (iMac12,2) suffered failure in its Radeon HS 6970M graphics card, and was one of several models whose warranties were extended because of this issue.

Apple wasn’t the only computer manufacturer to have such problems. Various models, mainly laptops, from PC manufacturers including Asus, Lenovo, and HP, had similar high failure rates in their graphics cards. Although some occurred as a result of GPU failure, the single common cause accounting for many was most probably the use of lead-free solder.

High-performance graphics cards run hot, because they do a lot in a small volume, particularly in compact systems such as laptops and all-in-one desktop models. Laptops have very high thermal stresses, because they’re often left cold for long periods, then run and become hot enough to warm bare thighs. Components, especially the GPU, may thus cycle between cold and hot several times a day.

On 1 July 2006, the EU banned the use of significant quantities of lead in most consumer electronics products, including computers and their accessories. Although this had the beneficial side-effect of reducing occupational exposure to lead fumes in those manufacturing and repairing electronic circuit boards, the drive for this came instead from growing concerns over lead in electronic waste.

The most immediate impact of that ban was the withdrawal from sale of Apple’s iSight camera at the end of that year, as that couldn’t be made using lead-free solder. Since then, substitute lead-free solders have become universally adopted in consumer electronics manufacture, but some non-consumer products continue to use traditional lead-based solders. This is because, despite sustained efforts to develop lead-free solders that perform as well, in practice products manufactured using them are more prone to failure, and have shorter working lives. Over the last decade, improved manufacturing techniques have reduced the chances of early failure, but now I’m happier using Apple silicon chips in any case.

Butterfly keyboards 2015-2019

In 2015, Apple released new MacBooks that incorporated a keyboard using a novel action, described as butterfly. These enabled their integrated keyboards to be thinner, and because this mechanism distributed finger pressure more evenly, Apple claimed the keys were more stable in use, and required less movement.

Although some preferred these butterfly keyboards, and had no problems in use, others started to report early failure, with keys getting stuck, repeating, or failing completely. These have been attributed to the accumulation of debris in the greater space within the keys. Attempts were made to tweak their design to eliminate these problems over the following four years, but ultimately Apple had to return to the proven scissor mechanism, which it did from 2019. As a result Apple had to operate its largest repair programme ever.

Apple Service Programmes

Although at times Apple might appear intransigent when problems occur with its products, its record ranks among the best of all computer manufacturers. There are currently two active service programmes, for 15-inch MacBook Pro batteries dating back to 2019, and more recently for a small number of M2 Mac minis. I repeatedly hear of those whose Macs have been replaced or repaired at no cost in order to satisfy customers, even though warranty, AppleCare or extended service programmes have expired. It’s one of Apple’s distinguishing features.

❌
❌