Fix caret jumping to start when unselecting autocomplete suggestion (#1844)

This commit is contained in:
BlueGreenMagick 2022-05-09 10:15:56 +09:00 committed by GitHub
parent cc374996cc
commit faa21266db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
const activeTag = tagTypes[active!];
activeName = selected ?? activeTag.name;
activeInput.setSelectionRange(Infinity, Infinity);
const inputEnd = activeInput.value.length;
activeInput.setSelectionRange(inputEnd, inputEnd);
}
async function updateTagName(tag: TagType): Promise<void> {