[Vuejs]-Vue 3 v-model not properly updating on in Andoid's Chrome?

1πŸ‘

βœ…

I’ve ran into this issue before.

It seems that on certain devices, the v-model waits for a change event, instead of an input one.

Apparently, it’s to do with the input method editor (IME) for the specific device.

You can check a discussion about this at https://github.com/vuejs/core/issues/5580

The workaround is to simply bind the input field with value and listen for the input event manually, e.g.

<input 
  type="text" 
  class="input"
  :value="searchTerm"
  @input="(e) => searchTerm = e.target.value"
  placeholder=" " 
/>
πŸ‘€BoBch27

Leave a comment