{"id":52409,"date":"2026-06-25T13:26:12","date_gmt":"2026-06-25T17:26:12","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=52409"},"modified":"2026-06-25T13:26:12","modified_gmt":"2026-06-25T17:26:12","slug":"webkit-always-enables-the-copy-menu-item-in-every-app","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2026\/06\/25\/webkit-always-enables-the-copy-menu-item-in-every-app\/","title":{"rendered":"WebKit Always Enables the Copy Menu Item in Every App"},"content":{"rendered":"<p><a href=\"https:\/\/daringfireball.net\/linked\/2026\/06\/24\/webkit-always-enables-the-copy-menu-item-in-every-app\">John Gruber<\/a> (<a href=\"https:\/\/mastodon.social\/@daringfireball\/116807321709240066\">Mastodon<\/a>):<\/p>\n<blockquote cite=\"https:\/\/daringfireball.net\/linked\/2026\/06\/24\/webkit-always-enables-the-copy-menu-item-in-every-app\">\n<p>In most Mac apps, since the dawn of time, if there is nothing selected to be copied, the Edit &#x2192; Copy (and Cut) commands are disabled. If you invoke the &#x2318;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&rsquo;t selected. That beep is useful context. This is proper behavior for all menu items&#x2009;&mdash;&#x2009;if they&rsquo;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 <em>always<\/em> enabled when a WebKit view has focus&#x2009;&mdash;&#x2009;but if nothing is selected, you get useless clipboard data that can&rsquo;t actually be pasted anywhere. (And whatever was on your clipboard is now gone, or pushed back if you use a clipboard history utility.)<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/lapcatsoftware.com\/articles\/2026\/6\/5.html\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"https:\/\/lapcatsoftware.com\/articles\/2026\/6\/5.html\">\n<p>I decided to file a bug report on behalf of Gruber: <a href=\"https:\/\/bugs.webkit.org\/show_bug.cgi?id=313835\">Copy main menu item is enabled with no selection in the web page<\/a>. I subsequently learned that the first appearance of the bug was January 2025 in <a href=\"https:\/\/commits.webkit.org\/288559@main\">the WebKit source code<\/a>, February 2025 in <a href=\"https:\/\/webkit.org\/blog\/16461\/release-notes-for-safari-technology-preview-213\/\">Safari Technology Preview 213<\/a>, and March 2025 in <a href=\"https:\/\/developer.apple.com\/documentation\/safari-release-notes\/safari-18_4-release-notes\">Safari 18.4<\/a>, as a result of attempting to fix another bug, <a href=\"https:\/\/bugs.webkit.org\/show_bug.cgi?id=156529\">document.execCommand(\"copy\") only triggers if there is a selection<\/a>, reported in 2016, nine years prior!<\/p>\n<p>[&#8230;]<\/p>\n<p>Sadly, my bug report was closed with the resolution &ldquo;won&rsquo;t fix.&rdquo; The refusal appears to be based on a misunderstanding[&#8230;]<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@lapcatsoftware\/116807968233151799\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@lapcatsoftware\/116807968233151799\">\n<p>LOL <a href=\"https:\/\/github.com\/WebKit\/WebKit\/pull\/67821\">that<\/a> was fast.<\/p>\n<p>Sometimes Apple is hilarious.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/09\/05\/web-pages-can-overwrite-your-clipboard\/\">Web Pages Can Overwrite Your Clipboard<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>John Gruber (Mastodon): In most Mac apps, since the dawn of time, if there is nothing selected to be copied, the Edit &#x2192; Copy (and Cut) commands are disabled. If you invoke the &#x2318;C shortcut while the Copy command is disabled, you hear an alert sound, letting you know that whatever you thought you were [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2026-06-25T17:26:16Z","apple_news_api_id":"4a28c94f-d8a0-42dd-8374-06c4c6653d75","apple_news_api_modified_at":"2026-06-25T17:26:16Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/ASijJT9igQt2DdAbExmU9dQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,30,2742,1670,103,328],"class_list":["post-52409","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-mac","tag-macos-tahoe-26","tag-pasteboard","tag-safari","tag-webkit"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=52409"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52409\/revisions"}],"predecessor-version":[{"id":52410,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/52409\/revisions\/52410"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=52409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=52409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=52409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}