Title: [191613] trunk/Source/WebInspectorUI
Revision
191613
Author
[email protected]
Date
2015-10-26 17:08:21 -0700 (Mon, 26 Oct 2015)

Log Message

Web Inspector: Spacebar to start recording should not cause system beep
https://bugs.webkit.org/show_bug.cgi?id=150573

Patch by Joseph Pecoraro <[email protected]> on 2015-10-26
Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._toggleRecordingOnSpacebar):
(WebInspector.TimelineSidebarPanel.prototype._toggleNewRecordingOnSpacebar):
The keyboard shortcuts do not implicitly prevent default because they may bail.
So in cases where they do handle the key, prevent default to prevent system beeps.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (191612 => 191613)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-10-26 23:53:54 UTC (rev 191612)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-10-27 00:08:21 UTC (rev 191613)
@@ -1,3 +1,16 @@
+2015-10-26  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Spacebar to start recording should not cause system beep
+        https://bugs.webkit.org/show_bug.cgi?id=150573
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/TimelineSidebarPanel.js:
+        (WebInspector.TimelineSidebarPanel.prototype._toggleRecordingOnSpacebar):
+        (WebInspector.TimelineSidebarPanel.prototype._toggleNewRecordingOnSpacebar):
+        The keyboard shortcuts do not implicitly prevent default because they may bail.
+        So in cases where they do handle the key, prevent default to prevent system beeps.
+
 2015-10-26  Matt Baker  <[email protected]>
 
         Web Inspector: Cleanup sidebar panels, reduce `delete` and use Maps instead of objects

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (191612 => 191613)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js	2015-10-26 23:53:54 UTC (rev 191612)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js	2015-10-27 00:08:21 UTC (rev 191613)
@@ -532,6 +532,8 @@
             return;
 
         this._toggleRecording();
+
+        event.preventDefault();
     }
 
     _toggleNewRecordingOnSpacebar(event)
@@ -540,6 +542,8 @@
             return;
 
         this._toggleRecording(true);
+
+        event.preventDefault();
     }
 
     _toggleRecording(shouldCreateRecording)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to