diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-15 07:13:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 07:13:16 +0000 |
commit | ea8aa1701a9f6ecb083356d345458f5baac852a5 (patch) | |
tree | 864c371434923eb1b525e335ba71cab79f68a08e /javascript/ui.js | |
parent | 4d19f3b7d461fe0f63e7ccff936909b0ce0c6126 (diff) | |
parent | a13af34b902bebc5df9509228380206a01f1245b (diff) | |
download | stable-diffusion-webui-gfx803-ea8aa1701a9f6ecb083356d345458f5baac852a5.tar.gz stable-diffusion-webui-gfx803-ea8aa1701a9f6ecb083356d345458f5baac852a5.tar.bz2 stable-diffusion-webui-gfx803-ea8aa1701a9f6ecb083356d345458f5baac852a5.zip |
Merge branch 'master' into master
Diffstat (limited to 'javascript/ui.js')
-rw-r--r-- | javascript/ui.js | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index 0f8fe68e..56f4216f 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -187,12 +187,10 @@ onUiUpdate(function(){ if (!txt2img_textarea) { txt2img_textarea = gradioApp().querySelector("#txt2img_prompt > label > textarea"); txt2img_textarea?.addEventListener("input", () => update_token_counter("txt2img_token_button")); - txt2img_textarea?.addEventListener("keyup", (event) => submit_prompt(event, "txt2img_generate")); } if (!img2img_textarea) { img2img_textarea = gradioApp().querySelector("#img2img_prompt > label > textarea"); img2img_textarea?.addEventListener("input", () => update_token_counter("img2img_token_button")); - img2img_textarea?.addEventListener("keyup", (event) => submit_prompt(event, "img2img_generate")); } }) @@ -220,14 +218,6 @@ function update_token_counter(button_id) { token_timeout = setTimeout(() => gradioApp().getElementById(button_id)?.click(), wait_time); } -function submit_prompt(event, generate_button_id) { - if (event.altKey && event.keyCode === 13) { - event.preventDefault(); - gradioApp().getElementById(generate_button_id).click(); - return; - } -} - function restart_reload(){ document.body.innerHTML='<h1 style="font-family:monospace;margin-top:20%;color:lightgray;text-align:center;">Reloading...</h1>'; setTimeout(function(){location.reload()},2000) |