mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-01-26 19:19:57 +00:00
Merge pull request #3 from HalfMAI/fix_input_event
This commit is contained in:
@@ -182,6 +182,10 @@ function insertTextAtCursor(text, tagword) {
|
||||
prompt = promptTextbox.value;
|
||||
promptTextbox.selectionEnd = promptTextbox.selectionStart;
|
||||
|
||||
// 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.
|
||||
promptTextbox.dispatchEvent(new Event("input", { bubbles: true }));
|
||||
|
||||
// Hide results after inserting
|
||||
hideResults();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user