Skip to content

Commit

Permalink
feat: re-focus text area after inserting
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost91- committed Aug 21, 2021
1 parent ccb3a2c commit a7f2553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/autocompleter.mjs
Expand Up @@ -320,8 +320,8 @@ export default class Autocompleter extends Application {
const postString = oldValue.slice(spliceEnd);
const postSpacer = (!postString.length || postString[postString.length - 1] === " ") ? "" : " ";
const insert = this.inputElement.value;
this.target.focus();
this.target.value = preString + preSpacer + this.keyPrefix + insert + postSpacer + postString;

await this.close();
this.target.dispatchEvent(new UIEvent("change", { bubbles: true }));
}
Expand Down

0 comments on commit a7f2553

Please sign in to comment.