[AC-1293] Change event on TextField behaves badly on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-09-15T04:01:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | TCSupportTriage, TextField, change, handler |
Reporter | Thomas Neerup |
Assignee | Shak Hossain |
Created | 2014-08-12T13:19:17.000+0000 |
Updated | 2016-03-08T07:37:41.000+0000 |
Description
Steps to Reproduce
Create a new Classic project Pase the code from the attached file Run the App on IOS Run the App on Android device/emulator Write a combination of numbers and letters in the fieldActual Result
On IOS the change event is called and if invalid input the old value is set on the field the cursor is placed where it was before the event was called On Android the change event is called and if invalid input the old value is set on the field but now the cursor is placed infront of the text.Expected Result
The cursor should not be repositioned On android it is virtually impossible to write a change handler to validate the contents of a TextField since the cursor is repositioned in front of the text if text is changed in the handler.Attachments
File | Date | Size |
---|---|---|
app.js | 2014-08-12T13:19:19.000+0000 | 1914 |
Hello, We have tested the issue with the code sample provided, and observed the same problem. In android for a wrong value input, the cursor moved back to the initial starting position. TESTING ENVIRONMENT CLI version 3.3.0, Titanium SDK version 3.3.0.GA Android and iOS Simulator Workaround We have tested this code that limits the user to input digits only. It's working fine for both android and iOS. CODE SAMPLE
Thanks.
Hello [~thomas.neerup@eg.dk]! Can you please take a look into the previous workaround and let me know if that solves the issue. Best Regards!
No the previous workaround does not solve the issue.. The code does not work...
Any news on this one? Or any thoughts on how to limit numeric input on a TextField on android?
I have tested this with SDK latest version. The workaround proposed works for me. I am going to mark this ticket as resolved. If you still get the error, please reopen this ticket.
OMG. How can this be closed and marked as Resolved. When the bug still exist.