decent progress
This commit is contained in:
parent
e901fc3f76
commit
a9ae4f9888
14 changed files with 318 additions and 162 deletions
|
|
@ -33,13 +33,13 @@ export function setRightMostCaretPosition(elem) {
|
|||
}
|
||||
|
||||
export function focusNextElement() {
|
||||
const editable = Array.from<any>(document.querySelectorAll('[contenteditable]'));
|
||||
const editable = Array.from<any>(document.querySelectorAll('input'));
|
||||
const index = editable.indexOf(document.activeElement);
|
||||
editable[index+1]?.focus();
|
||||
}
|
||||
|
||||
export function focusPrevElement() {
|
||||
const editable = Array.from<any>(document.querySelectorAll('[contenteditable]'));
|
||||
const editable = Array.from<any>(document.querySelectorAll('input'));
|
||||
const index = editable.indexOf(document.activeElement);
|
||||
const prevElem = editable[index-1]
|
||||
if (prevElem) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue