From 435d5c849e2b18b59a000529fb95fc2193c82563 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Sat, 26 Oct 2024 13:02:48 +0900 Subject: [PATCH] improve suggestions --- src/components/ExpressionEditor.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/ExpressionEditor.vue b/src/components/ExpressionEditor.vue index 841e739..02660cc 100644 --- a/src/components/ExpressionEditor.vue +++ b/src/components/ExpressionEditor.vue @@ -4,6 +4,8 @@ :value="value" @input="updateValue($event.target.value)" @keydown="handleKeyDown" + @blur="hideSuggestions" + @focus="handleInput" ref="codeEditor"/>
{ + this.showSuggestions = false + }, 100) + }, handleInput () { const cursorPosition = this.$refs.codeEditor.selectionStart const textBeforeCursor = this.value.slice(0, cursorPosition)