fix(device-picker) Close picker when another is open (#13190)

pull/13195/head jitsi-meet_8533
Robert Pintilii 2 years ago committed by GitHub
parent e772831f7c
commit 57dbd3cf54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      react/features/toolbox/components/web/AudioSettingsButton.tsx
  2. 6
      react/features/toolbox/components/web/VideoSettingsButton.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();
}

@ -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();
}

Loading…
Cancel
Save