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

Patch by Joseph Pecoraro <pecoraro@apple.com> 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.

Canonical link: https://commits.webkit.org/168732@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JosephPecoraro authored and webkit-commit-queue committed Oct 27, 2015
1 parent 1b78b84 commit e29e601d545ed30001466068d5cc15b628f26a94
Showing 2 changed files with 17 additions and 0 deletions.
@@ -1,3 +1,16 @@
2015-10-26 Joseph Pecoraro <pecoraro@apple.com>

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 <mattbaker@apple.com>

Web Inspector: Cleanup sidebar panels, reduce `delete` and use Maps instead of objects
@@ -532,6 +532,8 @@ WebInspector.TimelineSidebarPanel = class TimelineSidebarPanel extends WebInspec
return;

this._toggleRecording();

event.preventDefault();
}

_toggleNewRecordingOnSpacebar(event)
@@ -540,6 +542,8 @@ WebInspector.TimelineSidebarPanel = class TimelineSidebarPanel extends WebInspec
return;

this._toggleRecording(true);

event.preventDefault();
}

_toggleRecording(shouldCreateRecording)

0 comments on commit e29e601

Please sign in to comment.