Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9564] Android: Textfield- The enabled state of textfield is "undefined" by default.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-06-30T00:51:18.000+0000
Affected Version/sRelease 2.1.0, Release 3.1.0
Fix Version/s2013 Sprint 13 API, 2013 Sprint 13, Release 3.2.0
ComponentsAndroid
Labelsapi, module_textfield, qe-and060112, qe-testadded
ReporterNeha Chhabra
AssigneeBiju pm
Created2012-06-14T23:26:30.000+0000
Updated2014-02-21T11:24:52.000+0000

Description

While testing ,the enabled state of textfield is "undefined" by default on android devices whereas it works fine on iOS devices. This is not a regression.This even occurs on 2.0.2 Steps To Reproduce: 1. Install the app onto an Android device and launch it. 2. Check the console app.js

	var w = Titanium.UI.createWindow();
	w.backgroundColor='white';
	var tf= Ti.UI.createTextField();
	Ti.API.info(tf.enabled);
	tf.enabled = (tf.enabled)?false:true;
	Ti.API.info(tf.enabled);
	
	w.add(tf);
	
	w.open();
Actual Result: The default enabled state of the text field in the console is undefined. Expected Result: The default enabled state of the text field in the console should not be undefined.

Comments

  1. jithinpv 2013-03-04

    Issue reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Android Emulator: Android SDK version: 2.2 try this code: comment and uncomment enabled property var w = Titanium.UI.createWindow(); w.backgroundColor='white'; var tf= Ti.UI.createTextField({ width:100, //enabled:false, }); Ti.API.info(tf.width); Ti.API.info(tf.enabled); w.add(tf); w.open();
  2. Biju pm 2013-06-27

    Set default value is true https://github.com/appcelerator/titanium_mobile/pull/4423
  3. Priya Agarwal 2013-10-22

    Verified the fix with: Appc-Studio: 3.2.0.201310181700 Sdk:3.2.0.v20131021142445 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.0.3 Device:Samsung Note(v2.3.6), IphoneSimulator(v7.0) Xcode: 5 Enabled state for textfield is not undefined, now it returns boolean value.

JSON Source