GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-08-25T02:53:32.000+0000 |
Affected Version/s | Release 3.2.3 |
Fix Version/s | Release 3.1.0, 2013 Sprint 04 API, 2013 Sprint 04, Release 5.0.0 |
Components | Android |
Labels | android, decimal, defect, exalture, keyboard, parity, qe-3.2.3, qe-testadded, textfield, titanbeta |
Reporter | Shawn Lipscomb |
Assignee | Sunila |
Created | 2012-12-04T16:29:42.000+0000 |
Updated | 2015-09-03T18:33:22.000+0000 |
Problem
When the keyboardType propery of a TextField is set to Ti.UI.KEYBOARD_DECIMAL_PAD and autocorrect is set to false, the decimal point is not allowed to be entered into the textfield. This leaves no way to enter dollar amounts without using the default keyboard, which allows any character, and is therefore not appropriate.
Expected Behavior
autocorrect should not be interfering with numbers in the text field.
Actual Behavior
When auto correct is set to false The "numbers and punctuation" keyboard appears, but clicking on the decimal point has no effect.
Testcase
{panel:title=app.js}
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var textField = Ti.UI.createTextField({
borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
color : '#336699',
keyboardType : Ti.UI.KEYBOARD_DECIMAL_PAD,
returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
autocorrect : false,
textAlign : 'right',
width : '50%'
});
win.add(textField);
win.open();
{panel}
https://github.com/appcelerator/titanium_mobile/pull/3885
Tested with: Titanium Studio, build: 3.0.2.201302191606 Titanium SDK, build: 3.1.0.v20130306145654 Device: Nexus4 Android version 4.2 Emulator Google APIs(Android 2.2) Decimal point can be set.
Reopened. Cannot add a decimal point. Appcelerator Studio, build: 3.2.3.201404031900 Titanium SDK, build: 3.2.3.v20140403105720 Node.JS Version: v0.10.13 NPM Version: 1.3.2 ├── acs@1.0.14 ├── alloy@1.3.1 ├── node-appc@0.2.0 ├── npm@1.3.2 ├── titanium@3.2.3-alpha2 └── titanium-code-processor@1.1.1-alpha Devices: GalaxyS4 Android version 4.2.2 Galaxy Note 2 Android version 4.1.2
I'm confirming this is still an issue, tested on Galaxy SIII (4.4.2) with Ti SDK 3.4.1. I'm not sure it's related to autocorrect = false, I'm not setting autocorrect at all.
This is still an issue. Tested on Galaxy S3 (4.3) with Ti SDK 4.1.0. Autocorrect has no affect on decimal point.
Turns out autocorrect was the issue. [PR](https://github.com/appcelerator/titanium_mobile/pull/7048) created.
Test case:
Currently seeing in 4.X, when autocorrect is set to true, decimal point is disabled. The PR by [~CollinPrice] solves this. Will be putting his PR into 5.0.0 release.
New PR: https://github.com/appcelerator/titanium_mobile/pull/7065 PR Merged.
Closing ticket as fixed. Verified that if you have autocorrect set to true or false, then you can still use the decimal point with KEYBOARD_DECIMAL_PAD. Tested on: Appcelerator Studio, build: 5.0.0.201508271032 Appc CLI NPM: 4.2.0-1 Appc CLI Core: 5.0.0-33 Arrow: 1.2.52 SDK: 5.0.0.v20150902095518 Node: v0.10.38 OS: Yosemite (10.10.5) Devices: Samsung Galaxy S5 (4.4.2)