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

Cursor movement bug on Android Devices #432

Closed
DTupalov opened this issue Jul 18, 2016 · 10 comments
Closed

Cursor movement bug on Android Devices #432

DTupalov opened this issue Jul 18, 2016 · 10 comments

Comments

@DTupalov
Copy link

DTupalov commented Jul 18, 2016

@igorescobar, have some bug with input mask on Android devices. When typing digits in "Telephone" input, cursor stay still and values are added immediately after it.

For better understanding, I've recorded the video on device:
https://www.dropbox.com/s/0igokg7vvx8l0us/2016_07_18_13_12_37.mp4?dl=0

Samsung Galaxy Note 3
Android: 5.0
Chrome version: 51.0.2704.81
Plugin version: 1.14.0

UPDATE: after little research, I've founded closed issue #348 and fix in version 1.13.5. I've installed this version in my project and tested with same Andoid device, and it's work fine. With lastest version 1.14.0 bug is reproduced

@clifforama
Copy link

I notice the same. It's OK in 1.13.9, but broken again in 1.14.0.

@ThatMouse
Copy link

I can confirm cursor issue is in 1.14.0, but my sample works perfectly in 1.13.9. I have the same issue using RobinHerbots's inputmask. Cursor/Caret remains on left side of textbox and text does not input correctly.

Android 6.0.1 Nexus 5 / Chrome 52.0.2743.98

Not the best sample, but here's what I was testing with. I just need something that only allows alpha and some other characters that are common in people's names:
$("#tbFirstName").mask("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", { placeholder: "______________________", translation: { 'B': { pattern: /[a-zA-Z-., ]+/ } } });

@pmccloghrylaing
Copy link

pmccloghrylaing commented Aug 26, 2016

It seems to be related to predictive text in Android signavio/react-mentions#30. Depending on the situation "type=tel" or "autocomplete=off" are possible workarounds. Looks like they did some predictive text detection to fix the problem.

@igorescobar
Copy link
Owner

Does anyone knows what I should do to fix this? LOL

@igorescobar igorescobar changed the title Cursor movement bug on Andoid Devices Cursor movement bug on Android Devices Oct 12, 2016
@diebugger
Copy link
Contributor

Hi @igorescobar,
I tried to recover the function "setCaret" from version 1.13.9 and put it into the 1.14.0, in order to save the useful cleanVal() and masked() functions... and it seems to work on my Android device and on Chrome web browser. Hope this hint will help.
Keep on the good work!

@igorescobar
Copy link
Owner

@diebugger Could you submit it as a PR?

@igorescobar
Copy link
Owner

@DimonTD @clifforama @ThatMouse @pmccloghrylaing @diebugger can you guys test this PR? #464

@pmccloghrylaing
Copy link

pmccloghrylaing commented Nov 23, 2016

I've tested it and it causes a different problem.
I tested it this way:

  • '0000-0000' as a mask on a standard type="text" input
  • Type in '12345678'
  • Move the caret to before the '5', directly after the '-'
  • Type '123'
  • Expected result is '1234-1235'

The current version of the plugin produces '1234-3215' as the caret stays just after the '-'. This pull request produces '1234-1567' because the caret gets moved to the end.

Also, I found my suggestion of "autocomplete=off" or "type=tel" doesn't fix this.

@igorescobar
Copy link
Owner

@pmccloghrylaing So I guess we are back to the square 0? 😭

@igorescobar
Copy link
Owner

guys... lets all talk into the PR #464. I'm going to close this so we can organize this talk in only one thread.

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

No branches or pull requests

6 participants