{ "id": "103225", "key": "TIMOB-13146", "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": null, "resolutiondate": null, "created": "2012-10-12T16:24:35.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "backgroundColor", "iOS", "mobile", "reprod", "textfield" ], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:24.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "After clicking switchButton several times, the textField's background colour becomes transparent. It should maintain its state.\r\n\r\n-Changing the borderStyle of a textfield at runtime seems to change its background color.-\r\n\r\n-My goal is to have a \"disabled look\" for a textfield by removing its border at runtime. When setting it to round border again, its background becomes transparent instead of white (as it originally is).-\r\n\r\nThe following app.js shows the issue\r\n\r\n{noformat}\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'red',\r\n layout: 'vertical',\r\n});\r\n\r\n\r\nvar textField = Titanium.UI.createTextField({\r\n top: '20dp',\r\n width: '80%',\r\n value: 'Titanium',\r\n borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n touchEnabled: true,\r\n})\r\n\r\nvar switchButton = Titanium.UI.createButton({\r\n top: '10dp',\r\n width: '80%',\r\n title: 'Toggle'\r\n})\r\n\r\nswitchButton.addEventListener('click', function(){\r\n if(textField.touchEnabled){\r\n textField.borderStyle = Ti.UI.INPUT_BORDERSTYLE_NONE;\r\n textField.touchEnabled = false;\r\n //textField.backgroundColor = 'transparent'; // try to uncomment to see\r\n } else {\r\n textField.borderStyle = Ti.UI.INPUT_BORDERSTYLE_ROUNDED;\r\n textField.touchEnabled = true;\r\n //textField.backgroundColor = 'white'; // try to uncomment to see\r\n }\r\n});\r\n\r\nwin.add(textField);\r\nwin.add(switchButton);\r\nwin.open();\r\n{noformat}\r\n\r\n-When manually changing the backgroundColor to white to circumvent the problem, the corner of the textfield becomes white without respecting the rounded property (see screenshot).-", "attachment": [ { "id": "32563", "filename": "Screen Shot 2012-10-12 at 18.21.00.png", "author": { "name": "fstephany", "key": "fstephany", "displayName": "Francois Stephany", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-12T16:24:35.000+0000", "size": 17663, "mimeType": "image/png" }, { "id": "32562", "filename": "Screen Shot 2012-10-12 at 18.21.49.png", "author": { "name": "fstephany", "key": "fstephany", "displayName": "Francois Stephany", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-12T16:24:35.000+0000", "size": 19236, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Changing BorderStyle at runtime a few times causes rounded textField background colour to become transparent", "creator": { "name": "fstephany", "key": "fstephany", "displayName": "Francois Stephany", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "fstephany", "key": "fstephany", "displayName": "Francois Stephany", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 6, Ti SDK 3.0.2 GA", "comment": { "comments": [ { "id": "243323", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed described behavior on iOS 6 simulator, SDK 3.0.2 GA. However, what you have to understand is that when you set Ti.UI.INPUT_BORDERSTYLE_ROUNDED, the background colour of the round-cornered text field (white) is independent of the backgroundColor property. You can confirm this by setting a (blue) backgroundColor on the textField at creation.\n\nBut, what IS a bug, is that when you change the borderStyle a few times, the background colour of the text field becomes transparent, which shouldn't happen. So for that, I will move it to TIMOB.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-21T00:45:05.000+0000", "updated": "2013-03-21T00:45:05.000+0000" }, { "id": "250062", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "issue reproduces\n\nTested with\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0\niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-03T08:18:13.000+0000", "updated": "2013-05-03T08:18:13.000+0000" }, { "id": "422272", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue with the following environment;\r\niPhone 7 (10.2)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170609091155\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-19T20:05:53.000+0000", "updated": "2017-06-19T20:05:53.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }