By John Gruber
WorkOS Pipes: More context makes for smarter products.
Jeff Johnson:
Several weeks ago, John Gruber of Daring Fireball asked me whether I could reproduce an issue he was seeing in Safari: when a web page is focused, the Copy menu item in the main menu is always enabled, regardless of whether there’s anything selected in the web page. I could indeed reproduce that issue, and it turns out to be the fault of WebKit. The issue also occurs in Mail app, when an email message is focused.
On Apple platforms, WebKit is a public API, used by third-party apps in addition to Apple’s first-party apps. RSS readers such as NetNewsWire and Vienna, preferred by Gruber and myself, respectively, use WebKit to display articles from RSS feeds. And sure enough, both apps exhibit the same issue: the Copy menu item is always enabled when an article is focused.
What happens if you copy and paste from a WebKit WebView with no selection? Nothing happens, nothing is pasted. However, technically speaking, the clipboard is not empty.
In most Mac apps, since the dawn of time, if there is nothing selected to be copied, the Edit → Copy (and Cut) commands are disabled. If you invoke the ⌘C shortcut while the Copy command is disabled, you hear an alert sound, letting you know that whatever you thought you were copying could not be copied because it wasn’t selected. That beep is useful context. This is proper behavior for all menu items — if they’re not available to do something, they should be disabled, and invoking a disabled menu item keyboard shortcut should beep. In any app that uses WebKit, since early in 2025, the Copy command is always enabled when a WebKit view has focus — but if nothing is selected, you get useless clipboard data that can’t actually be pasted anywhere. (And whatever was on your clipboard is now gone, or pushed back if you use a clipboard history utility.)
This is clearly a bug. It cannot be acceptable that you can copy nothing, wiping out whatever was previously on the clipboard. (Or to be pedantic, to copy a useless inscrutable plist blob that can’t be pasted anywhere.)
Johnson reported this bug in WebKit’s Bugzilla system, but it was erroneously closed as “Won’t Fix”. There’s a conflation in the WebKit team’s closing of Johnson’s bug report between how the Edit → Copy command behaves in any WebKit-using app, and how JavaScript’s document.execCommand("copy") needs to be available even when there’s no selection in the WebKit view. WebKit engineers introduced the bug in application behavior when they attempted to fix the decade-old bug in the JavaScript behavior last year.
I was very glad to read on the WebKit blog, just this morning, that the WebKit team is encouraging the submission of bug reports. Here’s a bug that has already been reported, with copious details, that they merely need to look at again.
The WebKit blog (back during WWDC):
If you look through the lists of features and fixes in Safari 27, you’ll notice that, although there are 58 brand-new features and 525 fixes — the largest pile of fixes in any Safari release in recent memory — most of what is released is not about new things.
Most of this work has been about existing features behaving more correctly, handling more edge cases, and fitting together with other features the way you’d expect. We committed our time to increasing quality — that’s the story of this release and the year that led to it. [...]
If something has been bothering you, test it in Safari 27 beta. You might be pleasantly surprised. And if it hasn’t been fixed yet, file a bug report, or add a comment to an existing issue with a concrete scenario, a link to a real site, or a reduced test case. The more concrete the problem, the more helpful it is.
Sounds like it’s a bit of a Snow Leopard year for WebKit, too, not just the OSes.
Kickstarter campaign from Jason Snell and Myke Hurley to fund a 50-episode narrative podcast on Apple’s 50-year history. (Actually, with stretch goals, more than 50 episodes.) The campaign has already hit its primary funding goal but there’s a week left in the campaign and more stretch goals to hit. Jason and I spoke at length about Designed in California on the latest episode of my podcast, and like I said there — if you enjoy podcasts like The Talk Show and Upgrade and aren’t backing this campaign, you’re not hooked up right. Really looking forward to this when episodes start dropping.