Skip to content
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

Caret issue on mobile chrome leading to incorrect input #61

Closed
paraboul opened this issue Oct 8, 2017 · 14 comments
Closed

Caret issue on mobile chrome leading to incorrect input #61

paraboul opened this issue Oct 8, 2017 · 14 comments
Assignees
Projects
Milestone

Comments

@paraboul
Copy link

paraboul commented Oct 8, 2017

Trying a simple mask (##/##) on mobile chrome.

The caret positions itself before the '/' and stays one char behind (entering 1234 actually displays 12/43)

@paraboul paraboul changed the title Caret issue on mobile chrome Caret issue on mobile chrome leading to incorrect input Oct 8, 2017
@jontybrook
Copy link

I'm also seeing this. Using v-mask="'£######'", all works fine on desktop but in Chrome on mobile the first character flips infront of the subsequent chars. Eg entering "1234" results in "2341".

@shrpne
Copy link
Contributor

shrpne commented Oct 18, 2017

Looks like only Samsung devices affected by this issue. I have tested with Galaxy s5 mini.
Other devices with chrome works fine for me

@paraboul
Copy link
Author

@shrpne this is related to the Chrome version. Currently testing on an updated chrome on Android O (e.g. Google pixel)

@luiztsmelo
Copy link

luiztsmelo commented Oct 23, 2017

Same here, using a Xiaomi device and chrome 61. But using an Asus device with chrome 61 works fine.
Can't we do anything about it?

@tonpereira
Copy link

Hello, I'm having the same problem on Chrome mobile, and on Android 8 ..
Has any solution been found for this bug?
a field with mascara 000.000.000 and in time to appear the "." the mouse cursor goes to before the next digit, after the ".".

@probil
Copy link
Owner

probil commented Jan 31, 2018

Seems like related to #41

@lndsy-cherry
Copy link

I'm experiencing this issue as well. According to issue 41, it looks like this has been going on for a while. Any updates @probil? V-mask has worked so well up until this point!

@probil
Copy link
Owner

probil commented Feb 13, 2018

@lndsy-cherry I will try to reproduce and fix today (approx. in an hour)

@lndsy-cherry
Copy link

Thanks so much for the quick reply!!

@probil probil added this to Planned in v2 Feb 13, 2018
@probil probil self-assigned this Feb 13, 2018
@probil probil added this to the 1.3.2 milestone Feb 13, 2018
probil added a commit that referenced this issue Feb 13, 2018
Run update event async on mobile chrome only
Fixes #41 #61
@probil
Copy link
Owner

probil commented Feb 13, 2018

@lndsy-cherry I can't reproduce it on my android phone. :(
Could you please check the fix on your device? It's not yet published on npm so you need to install v-mask this way:

npm i probil/v-mask#feature/fix-caret-on-mobile-chrome

Please, let me know about the result of the testing.

@lndsy-cherry
Copy link

@probil I just tested and that fix worked like a charm! Please merge and thank you so much again for this! :)

probil added a commit that referenced this issue Feb 14, 2018
Run update event async on mobile chrome only
Fixes #41 #61
@probil
Copy link
Owner

probil commented Feb 14, 2018

Fixed in v1.3.2. Thanks everyone.

@probil probil closed this as completed Feb 14, 2018
@probil probil moved this from Planned to DONE in v2 Feb 14, 2018
@lndsy-cherry
Copy link

@probil it looks like some Android+Chrome devices are still experiencing an issue (I was testing on a Galaxy S5 earlier and noticed some cursor movement when typing a simple mask like ###-###), though it seems like there is no issue on an emulated Android+Chrome experience.

I see in your code you're using initEvent in the trigger function, yet this looks to be a deprecated feature (https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent). I'm wondering if this may be affecting this. Would you have any plans to update the event triggering used?

@probil
Copy link
Owner

probil commented Feb 27, 2018

@lndsy-cherry
That code was borrowed from vue core. But thanks for letting me know.
Let's discuss in the separate issue. Could you please create it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v2
DONE
Development

No branches or pull requests

7 participants