Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12246] Android: Auto correct set to false on TextField with KEYBOARD_DECIMAL_PAD doesn't allow decimal point

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2015-08-25T02:53:32.000+0000
Affected Version/sRelease 3.2.3
Fix Version/sRelease 3.1.0, 2013 Sprint 04 API, 2013 Sprint 04, Release 5.0.0
ComponentsAndroid
Labelsandroid, decimal, defect, exalture, keyboard, parity, qe-3.2.3, qe-testadded, textfield, titanbeta
ReporterShawn Lipscomb
AssigneeSunila
Created2012-12-04T16:29:42.000+0000
Updated2015-09-03T18:33:22.000+0000

Description

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}

Comments

  1. Allen Yeung 2013-02-22

    https://github.com/appcelerator/titanium_mobile/pull/3885
  2. Olga Romero 2013-03-07

    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.
  3. Olga Romero 2014-04-07

    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
  4. Justin Toth 2015-01-16

    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.
  5. Collin Price 2015-08-19

    This is still an issue. Tested on Galaxy S3 (4.3) with Ti SDK 4.1.0. Autocorrect has no affect on decimal point.
  6. Collin Price 2015-08-19

    Turns out autocorrect was the issue. [PR](https://github.com/appcelerator/titanium_mobile/pull/7048) created.
  7. Ashraf Abu 2015-08-25

    Test case:
       
       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 : true,
       	textAlign : 'right',
       	width : '50%'
       });
        
       win.add(textField);
       win.open(); 
       
    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.
  8. Ashraf Abu 2015-08-25

    New PR: https://github.com/appcelerator/titanium_mobile/pull/7065 PR Merged.
  9. Wilson Luu 2015-09-03

    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)

JSON Source