Answer the question
In order to leave comments, you need to log in
How to disable enter in textarea?
Hello, you need to do the following: when you press Enter in a textarea, call the handler function, but do not add a line break. I am using Vue.
I've already tried a bunch of options.
// Не работает :(
<template lang="pug">
textarea(
@keyup.enter="enterHandler"
)
</template>
<script>
export default {
methods: {
enterHandler(event) {
event.preventDefault()
// other logic
}
}
}
</script>
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