Answer the question
In order to leave comments, you need to log in
How not to hide the keyboard on mobile devices when triggering an event in vue?
There is an input field and a button to send a message
<textarea placeholder="Введите сообщение"
v-model.trim="inputText" v-focus
@keyup.ctrl.enter="sendMessage"></textarea>
<button @click.prevent="sendMessage"
:disabled="inputText === null || inputText === ''">
<img src="..." alt="Отправить">
</button>
sendMessage() {
event.preventDefault();
if (this.inputText !== null && this.inputText !== "") {
let message = this.inputText;
this.inputText = null;
axios.post(...)
}
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question