diff --git a/resources/assets/js/components/TagInput.vue b/resources/assets/js/components/TagInput.vue index 4c65d3bcd..ce5119e6c 100755 --- a/resources/assets/js/components/TagInput.vue +++ b/resources/assets/js/components/TagInput.vue @@ -18,7 +18,7 @@ :placeholder="tis || placeholderText" :enterkeyhint="enterkeyhint" @keydown.enter="downEnter($event)" - @keydown.delete="delTag(false)" + @keydown.delete="onBackspace($event)" @keyup="onKeyup" @focus="onFocus" @blur="onBlur" @@ -195,7 +195,20 @@ this.addTag(false, content) }, downEnter(e) { + if (e.isComposing || e.key === 'Process' || e.keyCode === 229) { + return; + } e.preventDefault(); + this.addTag(e, this.content); + this.$nextTick(() => { + this.$emit("on-enter", e) + }) + }, + onBackspace(e) { + if (e.isComposing || e.key === 'Process' || e.keyCode === 229) { + return; + } + this.delTag(false); }, onFocus(e) { this.isFocus = true; @@ -207,14 +220,7 @@ this.$emit("on-blur", e) }, onKeyup(e) { - this.addTag(e, this.content); - // this.$emit("on-keyup", e) - if (e.keyCode === 13) { - this.$nextTick(() => { - this.$emit("on-enter", e) - }) - } }, addTag(e, content) { if (e === false || e.keyCode === 13) { diff --git a/resources/assets/js/pages/login.vue b/resources/assets/js/pages/login.vue index 08373d07c..fc0ff29c3 100644 --- a/resources/assets/js/pages/login.vue +++ b/resources/assets/js/pages/login.vue @@ -25,7 +25,9 @@ -
+
{{$A.getFileName(item)}}
@@ -1989,7 +1989,7 @@ export default { this.onEnter(item); }, - onKeyup(e, item) { + onKeydown(e, item) { if (e.keyCode === 13) { this.onEnter(item); } else if (e.keyCode === 27) {