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(device-picker) Close picker when another is open (#13190)

Robert Pintilii57dbd3cf54f8
diff --git a/react/features/toolbox/components/web/AudioSettingsButton.tsx b/react/features/toolbox/components/web/AudioSettingsButton.tsx
index 13b1385235..202e48755f 100644
--- a/react/features/toolbox/components/web/AudioSettingsButton.tsx
+++ b/react/features/toolbox/components/web/AudioSettingsButton.tsx
@@ -100,9 +100,11 @@ class AudioSettingsButton extends Component<IProps> {
* @returns {void}
*/
_onClick(e?: React.MouseEvent) {
- const { onAudioOptionsClick } = this.props;
+ const { onAudioOptionsClick, isOpen } = this.props;
- e?.stopPropagation();
+ if (isOpen) {
+ e?.stopPropagation();
+ }
onAudioOptionsClick();
}
diff --git a/react/features/toolbox/components/web/VideoSettingsButton.tsx b/react/features/toolbox/components/web/VideoSettingsButton.tsx
index 0da6840729..af3696c725 100644
--- a/react/features/toolbox/components/web/VideoSettingsButton.tsx
+++ b/react/features/toolbox/components/web/VideoSettingsButton.tsx
@@ -117,9 +117,11 @@ class VideoSettingsButton extends Component<IProps> {
* @returns {void}
*/
_onClick(e?: React.MouseEvent) {
- const { onVideoOptionsClick } = this.props;
+ const { onVideoOptionsClick, isOpen } = this.props;
- e?.stopPropagation();
+ if (isOpen) {
+ e?.stopPropagation();
+ }
onVideoOptionsClick();
}