Title: [227008] trunk/Source/WebInspectorUI
Revision
227008
Author
[email protected]
Date
2018-01-16 15:17:36 -0800 (Tue, 16 Jan 2018)

Log Message

Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
https://bugs.webkit.org/show_bug.cgi?id=181706
<rdar://problem/36558221>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype._handleSpace):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (227007 => 227008)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-01-16 23:08:44 UTC (rev 227007)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-01-16 23:17:36 UTC (rev 227008)
@@ -1,3 +1,15 @@
+2018-01-16  Matt Baker  <[email protected]>
+
+        Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
+        https://bugs.webkit.org/show_bug.cgi?id=181706
+        <rdar://problem/36558221>
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/CanvasOverviewContentView.js:
+        (WI.CanvasOverviewContentView):
+        (WI.CanvasOverviewContentView.prototype._handleSpace):
+
 2018-01-16  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Make Console's Execution Context picker stand out when it is non-default

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js (227007 => 227008)


--- trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js	2018-01-16 23:08:44 UTC (rev 227007)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js	2018-01-16 23:17:36 UTC (rev 227008)
@@ -61,10 +61,16 @@
             new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Right, this._handleRight.bind(this)),
             new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Down, this._handleDown.bind(this)),
             new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Left, this._handleLeft.bind(this)),
-            new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this)),
-            new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this)),
         ];
 
+        let recordShortcut = new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
+        recordShortcut.implicitlyPreventsDefault = false;
+        this._keyboardShortcuts.push(recordShortcut);
+
+        let recordSingleFrameShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
+        recordSingleFrameShortcut.implicitlyPreventsDefault = false;
+        this._keyboardShortcuts.push(recordSingleFrameShortcut);
+
         for (let shortcut of this._keyboardShortcuts)
             shortcut.disabled = true;
     }
@@ -241,6 +247,9 @@
 
     _handleSpace(event)
     {
+        if (WI.isEventTargetAnEditableField(event))
+            return;
+
         if (!this._selectedItem)
             return;
 
@@ -250,6 +259,8 @@
             let singleFrame = !!event.shiftKey;
             WI.canvasManager.startRecording(this._selectedItem, singleFrame);
         }
+
+        event.preventDefault();
     }
 
     _updateShowImageGrid()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to