From 0e3b9a9ebd48f7815e1d8ee5f0459ce39d652bd0 Mon Sep 17 00:00:00 2001 From: dingedi Date: Sun, 2 Oct 2022 14:50:58 +0200 Subject: [PATCH] auto focus in input textarea --- app/static/js/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/static/js/app.js b/app/static/js/app.js index 3781c71..cd53e0e 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -92,6 +92,8 @@ document.addEventListener('DOMContentLoaded', function(){ M.FormSelect.init(this.$refs.targetLangDropdown); if (this.$refs.inputTextarea){ + this.$refs.inputTextarea.focus() + if (this.inputText === ""){ this.$refs.inputTextarea.style.height = this.inputTextareaHeight + "px"; this.$refs.translatedTextarea.style.height = this.inputTextareaHeight + "px";