Commit 9e5f6b55 authored by nai-degen's avatar nai-degen Committed by AUTOMATIC1111

triggers 'input' event when using arrow keys to edit attention

parent d7474a51
......@@ -38,4 +38,7 @@ addEventListener('keydown', (event) => {
target.selectionStart = selectionStart;
target.selectionEnd = selectionEnd;
}
// Since we've modified a Gradio Textbox component manually, we need to simulate an `input` DOM event to ensure its
// internal Svelte data binding remains in sync.
target.dispatchEvent(new Event("input", { bubbles: true }));
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment