{ "id": "62671", "key": "TIMOB-2039", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-07-20T13:53:05.000+0000", "created": "2011-04-15T03:08:47.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "training" ], "versions": [], "issuelinks": [ { "id": "19049", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "61509", "key": "TIMOB-877", "fields": { "summary": "iOS: TextField editable:false not implemented", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "19050", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T23:13:19.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

I have a textfield with both enabled and editable set to false.\r\nHowever, when it's shown, it's still editable and enabled.
\r\nCode:

\r\n

var tagcomment = Titanium.UI.createTextField({

\r\n
\r\nvalue:'',\r\nheight:'35px',\r\nwidth:300,\r\nborderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,\r\ntop:100,\r\nhintText: 'Enter a Tag',\r\n
\r\n

clearButtonMode: Titanium.UI.INPUT_BUTTONMODE_ALWAYS,

\r\n
\r\neditable: false,\r\nenabled: false\r\n
\r\n

}); tagview.add(tagcomment);

{html}", "attachment": [], "flagged": false, "summary": "TextField.enabled and TextField.editable don't work", "creator": { "name": "panman", "key": "panman", "displayName": "PanMan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "panman", "key": "panman", "displayName": "PanMan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127324", "author": { "name": "wallneradam", "key": "wallneradam", "displayName": "wallneradam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I have the same problem on iPad.

{html}", "updateAuthor": { "name": "wallneradam", "key": "wallneradam", "displayName": "wallneradam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:08:48.000+0000", "updated": "2011-04-15T03:08:48.000+0000" }, { "id": "127325", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Needs to be tested with permutations of editable/enabled; some\nof them are kind of ugly (e.g. editable=false;enabled=true).

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:08:48.000+0000", "updated": "2011-04-15T03:08:48.000+0000" }, { "id": "127326", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "{html}

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/75801

{html}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-15T03:08:49.000+0000", "updated": "2011-04-15T03:08:49.000+0000" }, { "id": "127327", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "{html}

Sample Code for Testing All Permutations

\n
\nvar win = Ti.UI.createWindow({ backgroundColor: '#fff' });\nvar scroll = Ti.UI.createScrollView({ layout: 'vertical' });\nwin.add(scroll);\n\nscroll.add(Titanium.UI.createTextField({\n    value:'Neither property, normal text field',\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\nscroll.add(Titanium.UI.createTextField({\n    value:'Editable: false',\n    editable: false,\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\nscroll.add(Titanium.UI.createTextField({\n    value:'Editable: true',\n    editable: true,\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\nscroll.add(Titanium.UI.createTextField({\n    value:'Enabled: false',\n    enabled: false,\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\nscroll.add(Titanium.UI.createTextField({\n    value:'Enabled: true',\n    enabled: true,\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\nscroll.add(Titanium.UI.createTextField({\n    value:'Enabled: false + Editable: false',\n    enabled: false,\n    editable: false,\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\nscroll.add(Titanium.UI.createTextField({\n    value:'Enabled: true + Editable: true',\n    enabled: true,\n    editable: true,\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\nscroll.add(Titanium.UI.createTextField({\n    value:'Enabled: true + Editable: false',\n    enabled: true,\n    editable: false,\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\nscroll.add(Titanium.UI.createTextField({\n    value:'Enabled: false + Editable: true',\n    enabled: false,\n    editable: true,\n    height:35,\n    right: 10,\n    top: 10,\n    borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\n}));\n\nwin.open();\n
{html}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-15T03:08:49.000+0000", "updated": "2011-04-15T03:08:49.000+0000" }, { "id": "159631", "author": { "name": "tonylukasavage", "key": "tonylukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm still having this issue as of sdk 1.7.1 for iphone", "updateAuthor": { "name": "tonylukasavage", "key": "tonylukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-14T19:34:29.000+0000", "updated": "2011-07-14T19:34:29.000+0000" }, { "id": "159632", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "re-assigning for proper scheduling. this looks to be a regression?", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-07-14T19:43:47.000+0000", "updated": "2011-07-14T19:43:47.000+0000" }, { "id": "161491", "author": { "name": "tonylukasavage", "key": "tonylukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still a problem in 1.7.2, at least for iPhone, haven't checked Android. I'm managing to work around it now with this:\r\n\r\n{code:JavaScript} \r\ntextField.addEventListener('focus', function(e) {\r\n e.source.blur();\r\n});\r\n{code} \r\n", "updateAuthor": { "name": "tonylukasavage", "key": "tonylukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-02T07:50:26.000+0000", "updated": "2011-08-02T08:03:01.000+0000" }, { "id": "177747", "author": { "name": "wallner", "key": "wallner", "displayName": "Adam Wallner", "active": true, "timeZone": "Europe/Budapest" }, "body": "It is still a problem in 1.8.0.1. It's in the documentation for ages that this property is supported on iPhone, but it has never been supported.\r\nI've created some modifications in TiUITextField.h and .m file, to implement this feature. Please include it into the next release.\r\n\r\nThanks.\r\n\r\n*TiUITextField.h:*\r\n{code}\r\n--- /Users/wallner/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/Classes/TiUITextField.h\t2011-12-23 12:03:47.000000000 +0100\r\n+++ /Users/wallner/Developer/Titanium/Studio/Scitec/build/iphone/Classes/TiUITextField.h\t2012-01-02 08:04:42.000000000 +0100\r\n@@ -24,8 +26,11 @@\r\n \t\r\n \tBOOL becameResponder;\r\n NSInteger maxLength;\r\n+ \r\n+ BOOL editable;\r\n }\r\n \r\n+@property(nonatomic,readwrite,assign) BOOL editable;\r\n @property(nonatomic,readwrite,assign) CGFloat paddingLeft;\r\n @property(nonatomic,readwrite,assign) CGFloat paddingRight;\r\n @property(nonatomic,readwrite,assign) CGFloat leftButtonPadding;\r\n}}\r\n{code}\r\n*TiUITextField.m:*\r\n{code}\r\n--- /Users/wallner/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/Classes/TiUITextField.m\t2011-12-23 12:03:47.000000000 +0100\r\n+++ /Users/wallner/Developer/Titanium/Studio/Scitec/build/iphone/Classes/TiUITextField.m\t2012-01-02 08:08:16.000000000 +0100\r\n@@ -18,6 +20,7 @@\r\n @implementation TiTextField\r\n \r\n @synthesize leftButtonPadding, rightButtonPadding, paddingLeft, paddingRight, becameResponder, maxLength;\r\n+@synthesize editable;\r\n \r\n -(void)configure\r\n {\r\n@@ -187,6 +190,7 @@\r\n \tif ([super becomeFirstResponder])\r\n \t{\r\n \t\t[self repaintMode];\r\n+ if (!self.editable) [self resignFirstResponder];\r\n \t\treturn YES;\r\n \t}\r\n \treturn NO;\r\n@@ -302,6 +306,12 @@\r\n \t[[self textWidgetView] setEnabled:[TiUtils boolValue:value]];\r\n }\r\n \r\n+-(void)setEditable_:(id)editable\r\n+{\r\n+\t[self textWidgetView].editable = [TiUtils boolValue:editable];\r\n+}\r\n+\r\n+\r\n -(void)setBackgroundImage_:(id)image\r\n {\r\n \tUITextField *tf = [self textWidgetView];\r\n{code}", "updateAuthor": { "name": "wallner", "key": "wallner", "displayName": "Adam Wallner", "active": true, "timeZone": "Europe/Budapest" }, "created": "2012-01-01T23:43:37.000+0000", "updated": "2012-01-01T23:44:27.000+0000" }, { "id": "208808", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of TIMOB-877.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-21T00:43:08.000+0000", "updated": "2012-07-21T00:43:08.000+0000" }, { "id": "414665", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate with reference to the above comments and links.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T23:13:19.000+0000", "updated": "2017-03-21T23:13:19.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }