Merge pull request #316 from shikorism/fix/295-trim-tag-space

タグの入力確定時にtrimする
This commit is contained in:
shibafu 2020-01-18 16:22:51 +09:00 committed by GitHub
commit ef23f1b12e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}