Made menu shortcuts work again when editing HTML
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Mar 2004 16:38:26 +0000 (16:38 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Mar 2004 16:38:26 +0000 (16:38 +0000)
        Reviewed by Darin.

        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::defaultEventHandler):
        Don't treat key events with command key down as
        editing events.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6269 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/xml/dom_elementimpl.cpp

index 0be629335b14d0957a6ca605893db1037d9832dc..470142141f4de41e5c2724709544df277a249467 100644 (file)
@@ -1,3 +1,14 @@
+2004-03-29  John Sullivan  <sullivan@apple.com>
+
+        Made menu shortcuts work again when editing HTML
+
+        Reviewed by Darin.
+
+        * khtml/xml/dom_elementimpl.cpp:
+        (ElementImpl::defaultEventHandler):
+        Don't treat key events with command key down as
+        editing events.
+
 2004-03-28  Darin Adler  <darin@apple.com>
 
         Reviewed by John.
index d4cbfbd0943a9d550ce2e5f69eca67c3896663f9..d80708c9330b7fcf502a8f21d7e7e3d841bcdfdc 100644 (file)
@@ -377,7 +377,8 @@ void ElementImpl::defaultEventHandler(EventImpl *evt)
 #if APPLE_CHANGES
     if (evt->id() == EventImpl::KEYPRESS_EVENT && isContentEditable()) {
         KHTMLPart *part = getDocument()->part();
-        if (part) {
+        // Don't treat command-key combos as editing key events
+        if (part && !static_cast<KeyboardEventImpl*>(evt)->metaKey()) {
             KWQ(part)->editingKeyEvent();
             evt->setDefaultHandled();
         }