I have a simple input type text and I want to remove the onKeyPress for performance.
I tested many solution like this by it doesn't work. I see again event press on performance tab in chrome navigator
mounted() {
const doc = document.getElementById('input-simple-text')
doc.onkeydown = null
}
// simple input
<input class="form-control"
id="input-simple-text"
type="text"
v-model="mutableValue"
ref="input" />
If you have solutions to delete this events , thanks
According to the documentation, you have quite a lot of possibilities. One of them is to prevent the event or stop its propagation. https://v2.vuejs.org/v2/guide/events.html#Event-Modifiers