NEW304117
Cmd+b, Cmd+i, Cmd+u do not trigger bold/italic/underlined in contenteditable
https://bugs.webkit.org/show_bug.cgi?id=304117
Summary Cmd+b, Cmd+i, Cmd+u do not trigger bold/italic/underlined in contenteditable
michael
Reported 2025-12-13 07:06:17 PST
These shortcuts work in other places of MacOS, e.g. in Apple Notes. Also other browsers (Chrome/Firefox) do support them. Context: https://github.com/w3c/editing/issues/492 W3C Editing Call 2025-12-11: > 08:02 #492 > 08:04 *** Ashish (~Ashish@2dbf1d10.publics.cloak) has joined the channel > 08:05 more of a request to make command+B/I/U toggle B/I/U in Safari > 08:06 seems inconsistent with iOS and other apps on macOS, but the "not dispatching events" part is consistent with not bolding
Attachments
Alexey Proskuryakov
Comment 1 2025-12-15 16:02:31 PST
Thank you for the report! This is currently expected behavior for WebKit, because these shortcuts are not hardcoded, they rely on matching menu actions, and Safari does not have a Format menu at all. I'm assuming (but didn't check) that the same is true of AppKit. That said, the behavior is clearly inconsistent with other browsers, and perhaps needs to be rethought.
Darin Adler
Comment 2 2025-12-15 16:18:52 PST
We could fix this in Safari. If we expect to do that, then we should probably move this to a Safari bug report rather than a WebKit but report.
Alexey Proskuryakov
Comment 3 2025-12-15 16:49:08 PST
Indeed. For what it's worth, I do not think that adding a Format menu in Safari would be appropriate. And if we were to hardcode the key combinations somewhere, we'd probably want contenteditable HTML content in other applications to gain the same quirk. I'm curious if these combinations are always the same in all localizations.
Note You need to log in before you can comment on or make changes to this bug.