Skip to content

Commit

Permalink
perf: stop event propagation in popup content
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeLin committed Nov 1, 2024
1 parent 6974dfe commit 8559ea4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/zarm/src/popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const Popup = React.forwardRef<HTMLDivElement, PopupProps>((props, ref) => {
}, []);

const handleClick = (event: React.MouseEvent) => {
event.stopPropagation();
if (nodeRef.current !== event.target && nodeRef.current.contains(event.target as HTMLElement)) {
return;
}
Expand Down

0 comments on commit 8559ea4

Please sign in to comment.