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(gifs): prevent GIF popover from closing on internal clicks

vishal2005025388381143925
diff --git a/react/features/gifs/components/web/GifsMenu.tsx b/react/features/gifs/components/web/GifsMenu.tsx
index 8f77526f66..ab98069f18 100644
--- a/react/features/gifs/components/web/GifsMenu.tsx
+++ b/react/features/gifs/components/web/GifsMenu.tsx
@@ -191,12 +191,20 @@ function GifsMenu({ columns = 2, parent }: IProps) {
e.stopPropagation();
}, []);
+ // Prevent clicks inside the GIFs menu content (including the search input)
+ // from bubbling to the global window click handler used by Popover for
+ // outside-click dismissal.
+ const stopClickPropagation = useCallback((e: React.MouseEvent) => {
+ e.stopPropagation();
+ }, []);
+
const gifMenu = (
<div
className = { cx(styles.gifsMenu,
parent === IReactionsMenuParent.OverflowDrawer && styles.overflowDrawerMenu,
parent === IReactionsMenuParent.OverflowMenu && styles.overflowMenu
- ) }>
+ ) }
+ onClick = { stopClickPropagation }>
<Input
autoFocus = { true }
className = { cx(styles.searchField, 'gif-input') }