From fbe5cb3a05de2b70ce2cd4c75db8d3260b1a2451 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 20 Dec 2018 00:02:28 +0900 Subject: [PATCH] =?UTF-8?q?open=E5=87=A6=E7=90=86=E4=B8=AD=E3=81=AFopen?= =?UTF-8?q?=E3=81=AE=E5=87=A6=E7=90=86=E3=82=92=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=20(#3661)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * autocomplettimeout * fix * fix * Update autocomplete.ts * Update autocomplete.ts --- src/client/app/common/views/directives/autocomplete.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/app/common/views/directives/autocomplete.ts b/src/client/app/common/views/directives/autocomplete.ts index 355e3bd52..7f8e409a7 100644 --- a/src/client/app/common/views/directives/autocomplete.ts +++ b/src/client/app/common/views/directives/autocomplete.ts @@ -25,6 +25,7 @@ class Autocomplete { private opts: { model: string; }; + private opening: boolean; private get text(): string { return this.vm[this.opts.model]; @@ -48,6 +49,7 @@ class Autocomplete { this.textarea = textarea; this.vm = vm; this.opts = opts; + this.opening = false; } /** @@ -128,6 +130,8 @@ class Autocomplete { if (type != this.currentType) { this.close(); } + if (this.opening) return; + this.opening = true; this.currentType = type; //#region サジェストを表示すべき位置を計算 @@ -143,6 +147,8 @@ class Autocomplete { this.suggestion.x = x; this.suggestion.y = y; this.suggestion.q = q; + + this.opening = false; } else { const MkAutocomplete = await import('../components/autocomplete.vue').then(m => m.default); @@ -162,6 +168,8 @@ class Autocomplete { // 要素追加 document.body.appendChild(this.suggestion.$el); + + this.opening = false; } }