-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v-model on text input on chrome android not updating #9777
Comments
This is because you are using a keyboard that does composition (it may underline the text while typing). It is similar to Chinese input, Japanese input and many others. Vue intentionally waits if composing. Numbers and spaces terminate the composition mode |
@posva How many times are you planning to close this issue? I know that you've got a lucky phone that works perfectly, but you've now got 7 independent reports of this behaviour. Composition has nothing to do with it. |
This is working as expected. Gboard (and some other Android keyboards) has the feature of word suggestions - i.e. it shows a number of suggestions while you are half way through typing a word. This is marked by an underline under the current word that is being typed. It is considered incomplete until you either hit space (indicating ending the word) or explicitly selecting a suggestion. This is implemented using the same IME composition model as used in other language inputs. There is no way for Vue to special case this vs. other languages, and changing the behavior would be a breaking change. So this is a wontfix. If you for some reason absolutely need to update the model on every keypress, use a custom |
Ignore `composing` value on the input and eagerly modify the value while the user is still composing a value. vuejs#9299 vuejs#9777
@yyx990803 when you say "this is a wontfix", are you saying the |
One option is to listen for |
Hello guys, just a heads up regarding this problem. I've managed to fix just by changing my form data variables initial values from I've found the answer here: https://forum.vuejs.org/t/v-model-not-working-on-chrome-browser-on-android-device/36364/4?u=kuroski So: <template>
...
<v-text-field
id="message"
v-model="message"
label="Message*"
required
></v-text-field>
...
</template> <script>
....
data: () => ({
message: null // This doesn't work
}),
</script> <script>
....
data: () => ({
message: '' // This works
}),
</script> If you couldn't fix the problem just by using |
Version
2.6.8
Reproduction link
https://jsbin.com/damesok/1
Steps to reproduce
Using v-model on text inputs in Vue is not updating a normal characters are being typed. However, numbers and spaces do trigger the update.
What is expected?
My value on v-model should be updated when I type into the field in Chrome on Android
What is actually happening?
The input is not being detected until I insert a number or a space.
I was able to get this to work on mobile using :value="model" and @input="model = $event.target.value", but I would assume v-model should work the same.
I am creating this issue because an older issue reporting the same behavior has been closed but it does not appear the issue was fixed.
#9299
The text was updated successfully, but these errors were encountered: