Bug 25604

Summary: No way to intercept command-b or command-i on Mac WebKit
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: jparent, justin.garcia, ojan
Priority: P2 Keywords: GoogleBug
Version: 528+ (Nightly build)   
Hardware: Macintosh   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 25607    
Description Flags
test harness for showing this bug none

Description Eric Seidel (no email) 2009-05-06 22:03:04 PDT
No way to intercept command-b or command-i on Mac WebKit

HTML editors need to be able to tie in to do their own bold/italic handling (for notification change events or for recording extra data).  Multiple HTML editing libraries @ Google have hacks around this bug.

The current best-practice hack is to make the editable region plain-text only, and catch they key events yourself.  You never see the key events if the editable region is full rich text.
Comment 1 Eric Seidel (no email) 2009-05-06 22:13:44 PDT
Actually, I'm wrong.  You can turn on read-write-plaintext-only, but then you still don't get any key events to catch.
Comment 2 Eric Seidel (no email) 2009-05-06 22:14:24 PDT
Created attachment 30087 [details]
test harness for showing this bug
Comment 3 Eric Seidel (no email) 2009-05-07 21:03:58 PDT
The stack trace called:

#0	0x0370985b in WebCore::executeToggleBold at EditorCommand.cpp:977
#1	0x03705d67 in WebCore::Editor::Command::execute at EditorCommand.cpp:1480
#2	0x0031f6fb in -[WebHTMLView executeCoreCommandByName:] at WebHTMLView.mm:2358
#3	0x0030f463 in -[WebHTMLView _handleStyleKeyEquivalent:] at WebHTMLView.mm:4121
#4	0x003148b3 in -[WebHTMLView performKeyEquivalent:] at WebHTMLView.mm:4134
Comment 4 Alexey Proskuryakov 2009-05-08 08:50:43 PDT

*** This bug has been marked as a duplicate of 18693 ***