mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +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
|
||||
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 = {
|
||||
target: chatInput,
|
||||
currentTarget: chatInput,
|
||||
preventDefault: () => {},
|
||||
stopPropagation: () => {},
|
||||
persist: () => {},
|
||||
isDefaultPrevented: () => false,
|
||||
isPropagationStopped: () => false,
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
nativeEvent: new Event('input', { bubbles: true })
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue