fix: Focus end of field when editing (#779)

This commit is contained in:
HannesOberreiter
2024-06-06 20:06:16 +02:00
committed by GitHub
parent 0e3bc92a61
commit 4124ab17d2
5 changed files with 13 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
// eslint-disable-next-line import/prefer-default-export
export const focusEnd = (element) => {
element.focus();
element.setSelectionRange(element.value.length + 1, element.value.length + 1);
};