Title: [237560] trunk/Source/WebInspectorUI
Revision
237560
Author
[email protected]
Date
2018-10-29 12:13:00 -0700 (Mon, 29 Oct 2018)

Log Message

Web Inspector: prevent Canvas tab from listening for "space" when not visibile
https://bugs.webkit.org/show_bug.cgi?id=190988

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype.shown):
(WI.CanvasTabContentView.prototype.hidden): Added.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (237559 => 237560)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-10-29 19:08:24 UTC (rev 237559)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-10-29 19:13:00 UTC (rev 237560)
@@ -1,3 +1,15 @@
+2018-10-29  Devin Rousso  <[email protected]>
+
+        Web Inspector: prevent Canvas tab from listening for "space" when not visibile
+        https://bugs.webkit.org/show_bug.cgi?id=190988
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/CanvasTabContentView.js:
+        (WI.CanvasTabContentView):
+        (WI.CanvasTabContentView.prototype.shown):
+        (WI.CanvasTabContentView.prototype.hidden): Added.
+
 2018-10-27  Matt Baker  <[email protected]>
 
         Web Inspector: Table should support deleting rows

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js (237559 => 237560)


--- trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js	2018-10-29 19:08:24 UTC (rev 237559)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js	2018-10-29 19:13:00 UTC (rev 237560)
@@ -50,9 +50,11 @@
 
         this._recordShortcut = new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
         this._recordShortcut.implicitlyPreventsDefault = false;
+        this._recordShortcut.disabled = true;
 
         this._recordSingleFrameShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
         this._recordSingleFrameShortcut.implicitlyPreventsDefault = false;
+        this._recordSingleFrameShortcut.disabled = true;
     }
 
     static tabInfo()
@@ -102,10 +104,21 @@
     {
         super.shown();
 
+        this._recordShortcut.disabled = false;
+        this._recordSingleFrameShortcut.disabled = false;
+
         if (!this.contentBrowser.currentContentView)
             this.showRepresentedObject(this._canvasCollection);
     }
 
+    hidden()
+    {
+        this._recordShortcut.disabled = true;
+        this._recordSingleFrameShortcut.disabled = true;
+
+        super.hidden();
+    }
+
     restoreStateFromCookie(cookie)
     {
         // FIXME: implement once <https://webkit.org/b/177606> is complete.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to