fix(shortcuts) Ignore keyboard shortcuts when the button are disabled.
This commit is contained in:
parent
ae5c364333
commit
a23d57b5ff
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue