From af15add967a8b1c3ed8060a6cb0056afcc380bee Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 9 Jul 2023 15:41:19 -0400 Subject: [PATCH] Fix annoyance with textbox unselecting in chromium. --- web/scripts/widgets.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/scripts/widgets.js b/web/scripts/widgets.js index 89d4a2e38f3..4fc5dc19942 100644 --- a/web/scripts/widgets.js +++ b/web/scripts/widgets.js @@ -163,11 +163,12 @@ function addMultilineWidget(node, name, opts, app) { .multiplySelf(ctx.getTransform()) .translateSelf(margin, margin + y); + const scale = new DOMMatrix().scaleSelf(transform.a, transform.d) Object.assign(this.inputEl.style, { transformOrigin: "0 0", - transform: transform, - left: "0px", - top: "0px", + transform: scale, + left: `${transform.a + transform.e}px`, + top: `${transform.d + transform.f}px`, width: `${widgetWidth - (margin * 2)}px`, height: `${this.parent.inputHeight - (margin * 2)}px`, position: "absolute",