Skip to content

Commit

Permalink
fix : 7223 Clicking Outside Fields domain link email phone Close Them (
Browse files Browse the repository at this point in the history
  • Loading branch information
prathameshpatil5181 authored Nov 7, 2024
1 parent f3a3867 commit 3be3065
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,14 @@ export const MultiItemFieldInput = <T,>({
onCancel?.();
};

const handleDropdownCloseOutside = (event: MouseEvent | TouchEvent) => {
onCancel?.();
event.stopImmediatePropagation();
};

useListenClickOutside({
refs: [containerRef],
callback: handleDropdownClose,
callback: handleDropdownCloseOutside,
});

useScopedHotkeys(Key.Escape, handleDropdownClose, hotkeyScope);
Expand Down

0 comments on commit 3be3065

Please sign in to comment.