This commit is contained in:
Chris Kruining 2025-02-13 17:18:03 +11:00
parent 69fd9a1753
commit 8e0eee5847
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
8 changed files with 220 additions and 70 deletions

View file

@ -58,6 +58,13 @@ export function Textarea(props: TextareaProps) {
}))
}, 300);
const onInput = (e: InputEvent) => {
const target = e.target as HTMLElement;
console.log(e);
console.log(target.innerText, target.textContent, target.innerHTML);
};
const onKeyUp = (e: KeyboardEvent) => {
e.stopPropagation();
e.preventDefault();
@ -92,6 +99,7 @@ export function Textarea(props: TextareaProps) {
class={`${css.textarea} ${props.class}`}
lang={props.lang}
dir="auto"
oninput={onInput}
onkeyup={onKeyUp}
on:keydown={e => e.stopPropagation()}
on:pointerdown={e => e.stopPropagation()}