This commit is contained in:
retoor 2025-06-25 22:46:07 +02:00
parent 200b0178e7
commit 27de7a8b4e

View File

@ -66,7 +66,10 @@ this.recog.onresult = (e) => {
/* --- paint to DOM --- */
if (this.targetEl) {
this.targetEl.setAttribute("value",committed + interim)
this.targetEl.focus()
this.targetEl.value = committed + interim
/*this.targetElement.dispatchEvent(new ChangeEvent('change', {
bubbles: true,
cancelable: true
@ -94,7 +97,7 @@ this.recog.onresult = (e) => {
//if (name === 'target') this.targetEl = document.querySelector(newVal);
}
get targetEl() { return document.activeElement || null; }
get targetEl() { return document.querySelector("textarea") || null; }
connectedCallback() { // initial target lookup