We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0daa163 commit 528383aCopy full SHA for 528383a
apps/frontend/src/components/layout/click.outside.tsx
@@ -3,7 +3,13 @@ import { useEffect } from 'react';
3
export const useClickOutside = (callback: () => Promise<void>) => {
4
const handleClick = (event: MouseEvent) => {
5
const selector = document.querySelector('#add-edit-modal');
6
- if (selector && !selector.contains(event.target as HTMLElement)) {
+ const copilotkit = document.querySelector('.copilotKitPopup');
7
+ if (
8
+ selector &&
9
+ !selector.contains(event.target as HTMLElement) &&
10
+ copilotkit &&
11
+ !copilotkit.contains(event.target as HTMLElement)
12
+ ) {
13
callback();
14
}
15
};
0 commit comments