Skip to content
This repository has been archived by the owner on Jan 10, 2018. It is now read-only.

Android: Cursor doesn't move to end when space/slash inserted #24

Closed
RoryStolzenberg opened this issue Feb 10, 2013 · 6 comments
Closed

Comments

@RoryStolzenberg
Copy link

On formatCardNumber and formatCardExpiry, the plugin adds the space or slashes to the input box as appropriate, but the cursor doesn't move to the end. Note that the spaces/slashes are indeed added, but only after the cursor.

Tested on a Samsung Galaxy SIII running ICS using the stock browser, Dolphin, and a WebView (Chrome works correctly). On a Samsung Galaxy S 4G running Froyo (stock browser), the cursor appears to jump to the end, but further keystrokes continue to add text in the wrong place.

Screenshot_2013-02-09-21-54-11
Screenshot_2013-02-09-21-53-16

@maccman
Copy link
Contributor

maccman commented Feb 11, 2013

Interesting - can you try the example in the branch above?

@RoryStolzenberg
Copy link
Author

Doesn't seem to do anything on ICS.

This setSelectionRange problem seems to be the same as this bug, solved (but only on Android < 3.0) by the setTimeout workaround mentioned.

@maccman
Copy link
Contributor

maccman commented Feb 15, 2013

Working now? https://github.com/stripe/jquery.payment/tree/alex-android-cursor

I've applied the fix mentioned in that commit.

@phuphighter
Copy link

The setTimeout doesn't seem to fix it on Android 4.0.3.

@RoryStolzenberg
Copy link
Author

Doesn't work on Froyo either.

@jamesreggio
Copy link
Contributor

Fixed in #102 and available in v1.1.0.

https://github.com/stripe/jquery.payment/releases/tag/v1.1.0

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

No branches or pull requests

4 participants