Unverified Commit 7e5f1562 authored by byzod's avatar byzod Committed by GitHub

Update edit-attention.js

Fix https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3904
(Some sort of a workaround, the best way is to add unique id or class name to those prompt boxes)
parent d98eacea
addEventListener('keydown', (event) => { addEventListener('keydown', (event) => {
let target = event.originalTarget || event.composedPath()[0]; let target = event.originalTarget || event.composedPath()[0];
if (!target.hasAttribute("placeholder")) return; if (!target.matches("#toprow textarea.gr-text-input[placeholder]")) return;
if (!target.placeholder.toLowerCase().includes("prompt")) return;
if (! (event.metaKey || event.ctrlKey)) return; if (! (event.metaKey || event.ctrlKey)) return;
......
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