mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
SpeechToText js simplify the onChange event code
This commit is contained in:
parent
641dc51699
commit
edb51373b2
1 changed files with 1 additions and 7 deletions
|
@ -58,17 +58,11 @@
|
||||||
// Append to the existing value
|
// Append to the existing value
|
||||||
chatInput.value = chatInput.value + ' ' + text;
|
chatInput.value = chatInput.value + ' ' + text;
|
||||||
|
|
||||||
// Create a synthetic event that React's onChange will accept
|
// Create a simplified synthetic event with only essential properties
|
||||||
const syntheticEvent = {
|
const syntheticEvent = {
|
||||||
target: chatInput,
|
target: chatInput,
|
||||||
currentTarget: chatInput,
|
currentTarget: chatInput,
|
||||||
preventDefault: () => {},
|
preventDefault: () => {},
|
||||||
stopPropagation: () => {},
|
|
||||||
persist: () => {},
|
|
||||||
isDefaultPrevented: () => false,
|
|
||||||
isPropagationStopped: () => false,
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true,
|
|
||||||
nativeEvent: new Event('input', { bubbles: true })
|
nativeEvent: new Event('input', { bubbles: true })
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue