<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>18693</bug_id>
          
          <creation_ts>2008-04-23 00:17:38 -0700</creation_ts>
          <short_desc>Cmd-B and Cmd-I events cannot be overriden by JavaScript in editor mode.</short_desc>
          <delta_ts>2011-09-07 13:21:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Kou">martin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>ayg</cc>
    
    <cc>davidr</cc>
    
    <cc>dpopa</cc>
    
    <cc>eric</cc>
    
    <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78625</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Kou">martin</who>
    <bug_when>2008-04-23 00:17:38 -0700</bug_when>
    <thetext>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&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78626</commentid>
    <comment_count>1</comment_count>
      <attachid>20765</attachid>
    <who name="Martin Kou">martin</who>
    <bug_when>2008-04-23 00:18:19 -0700</bug_when>
    <thetext>Created attachment 20765
Test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78627</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Kou">martin</who>
    <bug_when>2008-04-23 00:18:56 -0700</bug_when>
    <thetext>This issue is causing the bug https://dev.fckeditor.net/ticket/1701 in FCKeditor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79148</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-04-28 10:53:16 -0700</bug_when>
    <thetext>Confirmed with r32635. IE allows JavaScript to cancel default processing for these events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79156</commentid>
    <comment_count>4</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-04-28 11:25:45 -0700</bug_when>
    <thetext>Similarly perhaps, Command-I cannot be used in Safari to invoke the Mail Contents of This Page command when in editable text (&lt;rdar://problem/5845299&gt;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120424</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-05-08 08:50:43 -0700</bug_when>
    <thetext>*** Bug 25604 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120477</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-05-08 15:41:28 -0700</bug_when>
    <thetext>I looked into this a little yesterday.  We&apos;re short-circuiting handling of these events.  I didn&apos;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.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>20765</attachid>
            <date>2008-04-23 00:18:19 -0700</date>
            <delta_ts>2008-04-23 00:18:19 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>1701.html</filename>
            <type>text/html</type>
            <size>1522</size>
            <attacher name="Martin Kou">martin</attacher>
            
              <data encoding="base64">PGh0bWw+Cgk8aGVhZD4KCQk8dGl0bGU+TWV0YSBob3RrZXlzIGNhbm5vdCBiZSBjYXB0dXJlZCBv
biBGaXJlZm94IE1hYzwvdGl0bGU+CgkJPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPgp3
aW5kb3cub25sb2FkID0gZnVuY3Rpb24oKQp7Cgl2YXIgZiA9IGRvY3VtZW50LmJvZHkuYXBwZW5k
Q2hpbGQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaWZyYW1lJykpOwoJZi5oZWlnaHQgPSA3MDA7
CglmLndpZHRoID0gOTAwOwoJZi5vbmxvYWQgPSBmdW5jdGlvbigpCgl7CgkJdmFyIGRvYyA9IGYu
Y29udGVudFdpbmRvdy5kb2N1bWVudDsKCQlkb2MuYm9keS5pbm5lckhUTUwgPSAnPHA+Tm93IHRo
ZXNlIHBvaW50cyBvZiBkYXRhIG1ha2UgYSBiZWF1dGlmdWwgbGluZS48YnI+JwoJCQkrICdBbmQg
d2VcJ3JlIG91dCBvZiBiZXRhLjxicj4nCgkJCSsgJ1dlXCdyZSByZWxlYXNpbmcgb24gdGltZS48
YnI+JwoJCQkrICc8L3A+PHA+U28gSVwnbSBHTGFELiBJIGdvdCBidXJuZWQuPGJyPicKCQkJKyAn
VGhpbmsgb2YgYWxsIHRoZSB0aGluZ3Mgd2UgbGVhcm5lZDxicj4nCgkJCSsgJ2ZvciB0aGUgcGVv
cGxlIHdobyBhcmUgc3RpbGwgYWxpdmUuPC9wPicKCQlkb2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