Vue v-model input change mobile chrome not work Vue v-model input change mobile chrome not work vue.js vue.js

Vue v-model input change mobile chrome not work


Update: After a lot of discussion, I've come to understand that this is a feature, not a bug. v-model is more complicated than you might at first think, and a mobile 'keyboard' is more complicated than a keyboard. This behaviour can surprise, but it's not wrong. Code your @input separately if you want something else.


Houston we might have a problem. Vue does not seem to be doing what it says on the tin. V-model is supposed to update on input, but if we decompose the v-model and code the @input explicitly, it works fine on mobile. (both inputs behave normally in chrome desktop)

For display on mobiles, the issue can be seen at...https://jsbin.com/juzakis/1

See this github issue.

function doIt(){    var vm = new Vue({        el : '#vueRoot',        data : {message : '',message1 : ''}    })}doIt();
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script><div id='vueRoot'><h1>v-model</h1>  <div>    <input type='text'      v-model='message'        >    {{message}}  </div>  <h1>Decomposed</h1>  <div>    <input type='text'        :value='message1'        @input='evt=>message1=evt.target.value'        >    {{message1}}  </div></div>