diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-19 00:20:31 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-09-19 00:20:31 +0800 |
| commit | df2ea92b415f28a7279643e230b6138f1e2961e2 (patch) | |
| tree | 46a31d9ba09d6dbf080a4dc7a74c16c0cef8443a /src | |
| parent | 95408f1ff40d398c0acc1d89d5d84f839b958a42 (diff) | |
fix: don't show suggestion list in case
Diffstat (limited to 'src')
| -rw-r--r-- | src/editor.mjs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/editor.mjs b/src/editor.mjs index 168e66b..cd7681c 100644 --- a/src/editor.mjs +++ b/src/editor.mjs | |||
| @@ -502,6 +502,9 @@ cm.on("cursorActivity", (_) => { | |||
| 502 | handleTypingInCodeBlock(anchor) | 502 | handleTypingInCodeBlock(anchor) |
| 503 | } | 503 | } |
| 504 | }); | 504 | }); |
| 505 | cm.on("blur", () => { | ||
| 506 | suggestionsEle.style.display = 'none' | ||
| 507 | }) | ||
| 505 | // }}} | 508 | // }}} |
| 506 | // EVENT: keydown for suggestions {{{ | 509 | // EVENT: keydown for suggestions {{{ |
| 507 | const keyForSuggestions = ['Tab', 'Enter', 'Escape'] | 510 | const keyForSuggestions = ['Tab', 'Enter', 'Escape'] |