Skip to content

Commit

Permalink
fix: handle click outside
Browse files Browse the repository at this point in the history
  • Loading branch information
hkgnp committed Sep 19, 2023
1 parent 6bf96f0 commit 001ec60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/features/send/components/SendTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const SendTask = ({

return (
<div className="flex h-screen justify-end" tabIndex={-1}>
<div className="flex px-3 w-80 items-center bg-gray-50">
<div className="sendPopup flex px-3 w-80 items-center bg-gray-50">
<form className="w-full" onSubmit={handleSubmit}>
<label className="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Select a Project
Expand Down
2 changes: 1 addition & 1 deletion src/utils/handleListeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function handleListeners() {

// Click
document.addEventListener("click", (e) => {
if (!(e.target as HTMLElement).closest("body")) {
if (!(e.target as HTMLElement).closest(".sendPopup")) {
logseq.hideMainUI({ restoreEditingCursor: true });
}
e.stopPropagation();
Expand Down

0 comments on commit 001ec60

Please sign in to comment.