aboutsummaryrefslogtreecommitdiffstats
path: root/javascript
diff options
context:
space:
mode:
authormissionfloyd <missionfloyd@users.noreply.github.com>2023-11-03 06:59:19 +0000
committermissionfloyd <missionfloyd@users.noreply.github.com>2023-11-03 06:59:19 +0000
commit8052a4971e1be48e1df2535284a7791cd1ad39ae (patch)
tree899533f7ef118581796fcd32e931b140b587d4eb /javascript
parent464fbcd92118bf00173b9982325fe6348201313e (diff)
downloadstable-diffusion-webui-gfx803-8052a4971e1be48e1df2535284a7791cd1ad39ae.tar.gz
stable-diffusion-webui-gfx803-8052a4971e1be48e1df2535284a7791cd1ad39ae.tar.bz2
stable-diffusion-webui-gfx803-8052a4971e1be48e1df2535284a7791cd1ad39ae.zip
Fix parenthesis auto selection
Fixes #13813
Diffstat (limited to 'javascript')
-rw-r--r--javascript/edit-attention.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/javascript/edit-attention.js b/javascript/edit-attention.js
index 04464100..688c2f11 100644
--- a/javascript/edit-attention.js
+++ b/javascript/edit-attention.js
@@ -28,7 +28,7 @@ function keyupEditAttention(event) {
if (afterParen == -1) return false;
let afterOpeningParen = after.indexOf(OPEN);
- if (afterOpeningParen != -1 && afterOpeningParen < beforeParen) return false;
+ if (afterOpeningParen != -1 && afterOpeningParen < afterParen) return false;
// Set the selection to the text between the parenthesis
const parenContent = text.substring(beforeParen + 1, selectionStart + afterParen);