Skip to content

Commit

Permalink
Set useCapture to true in listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
p-malecki committed Sep 18, 2024
1 parent 75190c5 commit 4933995
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vscode-extension/src/webview/components/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ function Preview({
setIsPressing(false);
}
}
addEventListener("blur", onBlurChange);
return () => removeEventListener("blur", onBlurChange);
}, [project]);
addEventListener("blur", onBlurChange, true);
return () => removeEventListener("blur", onBlurChange, true);
}, []);

useEffect(() => {
function dispatchPaste(e: ClipboardEvent) {
Expand Down

0 comments on commit 4933995

Please sign in to comment.