-
-
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 mobile not updating until a space is pressed #8231
Comments
it's because you're in composition mode (For accents, or languages like Japanese) (see the underline) |
If I understand you correctly, this will happen for all keyboards? Current documentation implies this should only happen for keyboards that require an IME |
Is there a way to still update the model directly and not wait for the |
Ok, I dont know if there is another solution for this issue, but it can be solved with a simple directive: Vue.directive('$model', {
bind: function (el, binding, vnode) {
el.oninput = () => (vnode.context[binding.expression] = el.value)
}
}) using it just like <input v-$model="{toBind}"> It works fine for me. |
This comment has been minimized.
This comment has been minimized.
(keyboard) devices - Fixes bug where network code would not update until after nextStep resolved and submitted data, resulting in empty network code being saved - See: - https://stackoverflow.com/questions/49929703/vue-js-watched-input-not-fired-on-every-keypress - vuejs/vue#8231 - vuejs/vue#5248 - https://stackoverflow.com/questions/50617865/vue-v-model-input-change-mobile-chrome-not-work
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
For me, this was easier than using a directive: Instead of:
do:
|
This comment has been minimized.
This comment has been minimized.
I have answered this question so many times already and even provided an alternative (#9814). #9777 (comment) explains it best. |
Version
2.5.16
Reproduction link
https://jsfiddle.net/yyx990803/xkkbfL3L/?utm_source=website&utm_medium=embed&utm_campaign=xkkbfL3L
Steps to reproduce
https://www.youtube.com/watch?v=y8CASLitwdw
What is expected?
Input data should be updated per keypress
What is actually happening?
Input data is only updated after a space is pressed
Reproduced on Android 7.1 Chrome 66 and Android 4.4.2 Firefox 60
The text was updated successfully, but these errors were encountered: