WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
18693
Cmd-B and Cmd-I events cannot be overriden by JavaScript in editor mode.
https://bugs.webkit.org/show_bug.cgi?id=18693
Summary
Cmd-B and Cmd-I events cannot be overriden by JavaScript in editor mode.
Martin Kou
Reported
2008-04-23 00:17:38 PDT
When editor mode is enabled, it is impossible to receive the keydown events of Meta-B and Meta-I in JavaScript. This is a serious problem for implementing web based editors because it is often desirable to implement custom logic for the hotkeys instead of always following the browser's default. To reproduce the issue: 1. Open the attached HTML test case. 2. Click in the iframe area, a caret should appear indicating the area is editable. 3. Press any Meta combination that's not Meta-I or Meta-B, the correct keycode should be printed out in the editing area. 4. Press Meta-I or Meta-B, the keycode is not printed out indicating the JavaScript logic failed to receive the events.
Attachments
Test case
(1.49 KB, text/html)
2008-04-23 00:18 PDT
,
Martin Kou
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Martin Kou
Comment 1
2008-04-23 00:18:19 PDT
Created
attachment 20765
[details]
Test case
Martin Kou
Comment 2
2008-04-23 00:18:56 PDT
This issue is causing the bug
https://dev.fckeditor.net/ticket/1701
in FCKeditor.
Alexey Proskuryakov
Comment 3
2008-04-28 10:53:16 PDT
Confirmed with
r32635
. IE allows JavaScript to cancel default processing for these events.
mitz
Comment 4
2008-04-28 11:25:45 PDT
Similarly perhaps, Command-I cannot be used in Safari to invoke the Mail Contents of This Page command when in editable text (<
rdar://problem/5845299
>).
Alexey Proskuryakov
Comment 5
2009-05-08 08:50:43 PDT
***
Bug 25604
has been marked as a duplicate of this bug. ***
Eric Seidel (no email)
Comment 6
2009-05-08 15:41:28 PDT
I looked into this a little yesterday. We're short-circuiting handling of these events. I didn't quite know how to hook into the NSResponder/NSTextField model in order to process the key events at the right time however. It seems we might have to implement our own processKeyEvents: which is called from the EditorClient handleKeyEvent callback. I should post actual stack traces in the bug for more intelligent discussion.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug