commit 11913348a8cdb6f2dedaa834ff8aae570cc1b319
parent 5e2af3f687d931917dfac1a7b2fc692cf465fc3c
Author: tongong <tongong@gmx.net>
Date: Fri, 1 Apr 2022 18:34:43 +0200
fixed textarea focus
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/components/edit-view.js b/src/components/edit-view.js
@@ -14,7 +14,11 @@ module.exports = () => {
binding = new TextAreaBinding(
ydoc.getText("shared-buffer"), v.dom);
}, { fireImmediately: true });
- v.dom.focus();
+ store.subscribe(s => s.qr, (qrn, qro) => {
+ if (!qrn && qro) {
+ v.dom.focus();
+ }
+ });
},
})),
)