From 2edabfa38f12f0fbfcbf55015395f07c0705c3bb Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 18 Jan 2020 00:31:51 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=82=B0=E3=81=AE=E5=85=A5=E5=8A=9B?= =?UTF-8?q?=E7=A2=BA=E5=AE=9A=E6=99=82=E3=81=ABtrim=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/components/TagInput.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/components/TagInput.vue b/resources/assets/js/components/TagInput.vue index be3458b..c1d10ef 100644 --- a/resources/assets/js/components/TagInput.vue +++ b/resources/assets/js/components/TagInput.vue @@ -41,7 +41,7 @@ case 'Enter': case ' ': if ((event as any).isComposing !== true) { - this.tags.push(this.buffer); + this.tags.push(this.buffer.trim()); this.buffer = ""; } event.preventDefault(); @@ -49,7 +49,7 @@ case 'Unidentified': // 実際にテキストボックスに入力されている文字を見に行く (フォールバック処理) if (event.srcElement && (event.srcElement as HTMLInputElement).value.slice(-1) == ' ') { - this.tags.push(this.buffer); + this.tags.push(this.buffer.trim()); this.buffer = ""; event.preventDefault(); }