fix(mentions): chinese or japanese input error (#4524)

pull/4543/head
mehunk 2021-08-18 08:36:28 +08:00 committed by GitHub
parent af0620d14e
commit c7abe76939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,9 @@ const Mentions = {
const { measureText: prevMeasureText, measuring } = this.$data;
const { prefix = '', validateSearch } = this.$props;
const target = event.target;
if (target.composing) {
return;
}
const selectionStartText = getBeforeSelectionText(target);
const { location: measureIndex, prefix: measurePrefix } = getLastMeasureIndex(
selectionStartText,