decent progress

This commit is contained in:
Joeri Exelmans 2025-05-11 22:54:23 +02:00
parent e901fc3f76
commit a9ae4f9888
14 changed files with 318 additions and 162 deletions

View file

@ -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) {