Web Inspector: do not switch panels on Cmd + -> while in console.
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Nov 2011 12:36:00 +0000 (12:36 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Nov 2011 12:36:00 +0000 (12:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71281

Reviewed by Yury Semikhatsky.

* inspector/front-end/InspectorView.js:
(WebInspector.InspectorView.prototype._keyDown):

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

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/InspectorView.js

index 94b0af3..4ffbcc2 100644 (file)
@@ -1,3 +1,13 @@
+2011-11-01  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: do not switch panels on Cmd + ->  while in console.
+        https://bugs.webkit.org/show_bug.cgi?id=71281
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/InspectorView.js:
+        (WebInspector.InspectorView.prototype._keyDown):
+
 2011-11-01  Zeno Albisser  <zeno.albisser@nokia.com>
 
         [Qt] bad codegen, pointer diff in JSC::JSCallbackConstructor::JSCallbackConstructor
index 2519e15..8a8da5f 100644 (file)
@@ -87,23 +87,25 @@ WebInspector.InspectorView.prototype = {
 
     _keyDown: function(event)
     {
+        var isInEditMode = event.target.enclosingNodeOrSelfWithClass("text-prompt") || WebInspector.isEditingAnyField();
+
         switch (event.keyIdentifier) {
             case "Left":
-                var isBackKey = WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event);
+                var isBackKey = !isInEditMode && WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event);
                 if (isBackKey && this._canGoBackInHistory()) {
                     this._goBackInHistory();
                     event.preventDefault();
                 }
                 break;
-    
+
             case "Right":
-                var isForwardKey = WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event);
+                var isForwardKey = !isInEditMode && WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event);
                 if (isForwardKey && this._canGoForwardInHistory()) {
                     this._goForwardInHistory();
                     event.preventDefault();
                 }
                 break;
-    
+
             // Windows and Mac have two different definitions of [, so accept both.
             case "U+005B":
             case "U+00DB": // [ key