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(base/popover): check contextMenuRef in outside click handler (#15559)

Daksh Hiran61aae05d94a3
diff --git a/react/features/base/popover/components/Popover.web.tsx b/react/features/base/popover/components/Popover.web.tsx
index 416552bae2..b3ff2bd763 100644
--- a/react/features/base/popover/components/Popover.web.tsx
+++ b/react/features/base/popover/components/Popover.web.tsx
@@ -238,8 +238,10 @@ class Popover extends Component<IProps, IState> {
* @param {MouseEvent} e - The click event.
* @returns {void}
*/
- _onOutsideClick(e: React.MouseEvent) {
- if (!this._containerRef?.current?.contains(e.target as Node) && this.props.visible) {
+ _onOutsideClick(e: MouseEvent) {
+ if (!this._containerRef?.current?.contains(e.target as Node)
+ && !this._contextMenuRef?.contains?.(e.target as Node)
+ && this.props.visible) {
this._onHideDialog();
}
}