Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Jaya Allamsettya23d57b5fffd
diff --git a/react/features/toolbox/components/AudioMuteButton.js b/react/features/toolbox/components/AudioMuteButton.js
index 41d982e55d..458ae71583 100644
--- a/react/features/toolbox/components/AudioMuteButton.js
+++ b/react/features/toolbox/components/AudioMuteButton.js
@@ -109,6 +109,11 @@ class AudioMuteButton extends AbstractAudioMuteButton<Props, *> {
* @returns {void}
*/
_onKeyboardShortcut() {
+ // Ignore keyboard shortcuts if the audio button is disabled.
+ if (this._isDisabled()) {
+ return;
+ }
+
sendAnalytics(
createShortcutEvent(
AUDIO_MUTE,
diff --git a/react/features/toolbox/components/VideoMuteButton.js b/react/features/toolbox/components/VideoMuteButton.js
index 093213cccb..914d4b3b16 100644
--- a/react/features/toolbox/components/VideoMuteButton.js
+++ b/react/features/toolbox/components/VideoMuteButton.js
@@ -135,6 +135,11 @@ class VideoMuteButton extends AbstractVideoMuteButton<Props, *> {
* @returns {void}
*/
_onKeyboardShortcut() {
+ // Ignore keyboard shortcuts if the video button is disabled.
+ if (this._isDisabled()) {
+ return;
+ }
+
sendAnalytics(
createShortcutEvent(
VIDEO_MUTE,