Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Fixed issue with input on Android devices putting cursor behind the input. #200

Closed
wants to merge 1 commit into from

Conversation

travist
Copy link

@travist travist commented Dec 11, 2016

This seems to be fixing the same thing as #191 but does so with what seems MUCH less changes.

I realized that on my Samsung Galaxy S6 device, that any input (such as your phone number input on your demo site) the cursor would end up getting behind the input. I finally debugged the issue and realized that my device is actually "selecting" the character that is being input. What happens is this causes a different value for the input.selectionStart vs input.selectionEnd. When you are trying to get the caret position, you were using the input.selectionStart which ends up being at the beginning of the input character (which causes this issue).

It seems that you can solve all use cases by changing this to input.selectionEnd which will give you the end of any selection and the correct caret position.

@onepointcw
Copy link

I'am very interested by this fix.
This will be released soon ?

Thanks.

@samshay
Copy link

samshay commented Jun 20, 2017

When this branch going to be merge ???

@formio formio closed this by deleting the head repository Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants