Update.
This commit is contained in:
parent
88bb78fb23
commit
c05bd57fe1
@ -97,7 +97,7 @@ class STTButton extends HTMLElement {
|
|||||||
.replace(/\!/g, "!\n");
|
.replace(/\!/g, "!\n");
|
||||||
|
|
||||||
this.targetEl.value = ''; // punctuated;
|
this.targetEl.value = ''; // punctuated;
|
||||||
this.simulateTypingWithEvents(this.targetEl, punctuated, 1).then(() => {
|
this.simulateTypingWithEvents(this.targetEl, punctuated, 0).then(() => {
|
||||||
const chatInput = document.querySelector('chat-input');
|
const chatInput = document.querySelector('chat-input');
|
||||||
chatInput.finalizeMessage();
|
chatInput.finalizeMessage();
|
||||||
});
|
});
|
||||||
@ -116,15 +116,16 @@ class STTButton extends HTMLElement {
|
|||||||
el.focus();
|
el.focus();
|
||||||
|
|
||||||
if (el.isContentEditable) {
|
if (el.isContentEditable) {
|
||||||
el.innerText = el.innerText.replace(new RegExp(previousInterim + '$'), interim);
|
el.innerText = el.innerText.replace(new RegExp(previousInterim + '$'), '');
|
||||||
} else {
|
} else {
|
||||||
el.value = interim
|
el.value = ''
|
||||||
|
// el.value = interim
|
||||||
//el.value = el.value.replace(new RegExp(previousInterim + '$'), interim);
|
//el.value = el.value.replace(new RegExp(previousInterim + '$'), interim);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
this.simulateTypingWithEvents(el, interim, 0).then(() => {
|
this.simulateTypingWithEvents(el, interim, 0).then(() => {
|
||||||
previousInterim = interim;
|
previousInterim = interim;
|
||||||
});*/
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user