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>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: jparent, justin.garcia, ojan
Priority: P2 Keywords: GoogleBug
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 25607    
Attachments:
Description Flags
test harness for showing this bug none

Eric Seidel (no email)
Reported 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.
Attachments
test harness for showing this bug (1.73 KB, text/html)
2009-05-06 22:14 PDT, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 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.
Eric Seidel (no email)
Comment 2 2009-05-06 22:14:24 PDT
Created attachment 30087 [details] test harness for showing this bug
Eric Seidel (no email)
Comment 3 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
Alexey Proskuryakov
Comment 4 2009-05-08 08:50:43 PDT
*** This bug has been marked as a duplicate of 18693 ***
Note You need to log in before you can comment on or make changes to this bug.