Skip to content

Commit 9bc2af8

Browse files
committed
only prompt when the custom dictionary is changed
1 parent c909dd0 commit 9bc2af8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,10 @@ function main() {
403403
errorBox.close();
404404
});
405405
addEventListener("beforeunload", (event) => {
406-
if (customDictionaryDialogBox.open) {
406+
if (
407+
customDictionaryDialogBox.open &&
408+
lastSavedText !== customDictionaryTextBox.value
409+
) {
407410
event.preventDefault();
408411
}
409412
});

0 commit comments

Comments
 (0)