I am facing an issue with inputs that have the @keyup.enter event assigned to a method that is supposed to reset the value of variables bound to these inputs to null. Here is an example of my code:
methods:{
clear: function () {
this.something1 = null;
this.something2 = null;
}
},
<input type="text" v-model="something1" @keyup.enter="clear">
<input type="text" v-model="something2" @keyup.enter="clear">
Strangely, the input that received the keyup event does not get cleared while the other input works fine. How can I resolve this issue?