Bug 304117
| Summary: | Cmd+b, Cmd+i, Cmd+u do not trigger bold/italic/underlined in contenteditable | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | michael |
| Component: | HTML Editing | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
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
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
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
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
<rdar://problem/166940952>