Skip to content
Snippets Groups Projects
Commit d059d7f9 authored by tamaina's avatar tamaina Committed by syuilo
Browse files

open処理中はopenの処理をしないように (#3661)

* autocomplettimeout

* fix

* fix

* Update autocomplete.ts

* Update autocomplete.ts
parent c03e2dfb
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment