fix(shortcuts) Ignore keyboard shortcuts when the button are disabled.

This commit is contained in:
Jaya Allamsetty 2021-12-09 14:34:12 -05:00 committed by Дамян Минков
parent ae5c364333
commit a23d57b5ff
2 changed files with 10 additions and 0 deletions

View File

@ -109,6 +109,11 @@ class AudioMuteButton extends AbstractAudioMuteButton<Props, *> {
* @returns {void} * @returns {void}
*/ */
_onKeyboardShortcut() { _onKeyboardShortcut() {
// Ignore keyboard shortcuts if the audio button is disabled.
if (this._isDisabled()) {
return;
}
sendAnalytics( sendAnalytics(
createShortcutEvent( createShortcutEvent(
AUDIO_MUTE, AUDIO_MUTE,

View File

@ -135,6 +135,11 @@ class VideoMuteButton extends AbstractVideoMuteButton<Props, *> {
* @returns {void} * @returns {void}
*/ */
_onKeyboardShortcut() { _onKeyboardShortcut() {
// Ignore keyboard shortcuts if the video button is disabled.
if (this._isDisabled()) {
return;
}
sendAnalytics( sendAnalytics(
createShortcutEvent( createShortcutEvent(
VIDEO_MUTE, VIDEO_MUTE,