I have an input whose model property is beeing watched. The problem is that the watch method is not called on every key press in Chrome Android devices. If I tap the input text, then it gets called.
It did worked in the past and I don't know what happened.
On Chrome Desktop it works (that is: the watch for text is beeing called on every keypress).
Input:
<input id="input-message" ref="input-message" :disabled="disabled"
@focus="$emit('focus')" @keyup.enter="sendMessage"
v-model="text" type="text" placeholder="Start typing..."
class="form-control">
Watch:
watch: {
disabled: function(val) {
if (!val) {
this.$nextTick(() => {
this.$refs["input-message"].focus();
});
}
},
text: function(val) {
var mode = this.micMode;
if (this.userAgent !== "ios") {
let isEmpty = val.length === 0;
if (mode === 1 && !isEmpty) {
this.micMode = 0;
} else if (mode === 0 && isEmpty) {
this.micMode = 1;
}
}
}
},