Merge pull request #327 from dingedi/main

auto focus in input textarea
This commit is contained in:
Dingedi 2022-10-02 14:52:04 +02:00 committed by GitHub
commit ea3979ab0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,8 @@ document.addEventListener('DOMContentLoaded', function(){
M.FormSelect.init(this.$refs.targetLangDropdown); M.FormSelect.init(this.$refs.targetLangDropdown);
if (this.$refs.inputTextarea){ if (this.$refs.inputTextarea){
this.$refs.inputTextarea.focus()
if (this.inputText === ""){ if (this.inputText === ""){
this.$refs.inputTextarea.style.height = this.inputTextareaHeight + "px"; this.$refs.inputTextarea.style.height = this.inputTextareaHeight + "px";
this.$refs.translatedTextarea.style.height = this.inputTextareaHeight + "px"; this.$refs.translatedTextarea.style.height = this.inputTextareaHeight + "px";