Bug 304117

Summary: Cmd+b, Cmd+i, Cmd+u do not trigger bold/italic/underlined in contenteditable
Product: WebKit Reporter: michael
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ap, darin, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 26   
Hardware: Mac (Intel)   
OS: macOS 26   
See Also: https://bugs.webkit.org/show_bug.cgi?id=129436

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.
Darin Adler
Comment 4 2025-12-16 19:49:37 PST
In terms of whether this should be a Format menu or something invisible that’s not in a menu, seems like it’s an Mac UI design decision that I would want help on from Apple’s HI team. I agree that we should seek a solution that would make this to work in other apps too.
Radar WebKit Bug Importer
Comment 5 2025-12-20 07:07:10 PST
Note You need to log in before you can comment on or make changes to this bug.