{ "id": "169106", "key": "TIMOB-25023", "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": [ { "id": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-08-04T18:10:16.000+0000", "created": "2017-07-26T02:50:38.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-08-15T22:21:46.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "It seems that if you try setting certain properties like backgroundColor in the controller and NOT in the tss file, these get ignored.\r\n\r\nh6.Reproduce Steps:\r\n1) Open example code attacheded in a alloy project.\r\n2) Observe how $.square has no backgroundColor defined (commented out, line 26)\r\n3) In index.js observe how $.square's backgroundColor is being set (to backgroundColorChecked, which is equal to red).\r\n4) Compile and run app (can be done with -T ws-local)\r\n5) When app launches, observe how $.square seems not to show, like it's not there. That's because the backgroundColor set in line 4 of index.js didn't really work\r\n6) Also, observe how $.square.backgroundColorChecked=red and $.square.backgroundColorUnchecked=blue prints in the console, so the reference to the colors actually exists.\r\n7) Go to index.tss and uncomment line #26 out.\r\n8) Compile the app and run it again. Observe how the backgroundColor is indeed applied this time to $.square.\r\n9) Also observe how width and height values set in lines 6 and 7 of index.js seem to be applied to $.square just fine, unlike backgroundColor.\r\n\r\nh6.Note\r\nTested this with Android and iOS and it works there.\r\n\r\nh6.Plus\r\nSame EXACT behavior happens with the backgroundImage property of Ti.UI.View AND color property of a Ti.UI.Label.", "attachment": [ { "id": "62921", "filename": "index.js", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-07-26T02:50:14.000+0000", "size": 306, "mimeType": "text/javascript" }, { "id": "62920", "filename": "index.tss", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-07-26T02:50:31.000+0000", "size": 709, "mimeType": "application/octet-stream" }, { "id": "62922", "filename": "index.xml", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-07-26T02:50:06.000+0000", "size": 135, "mimeType": "text/xml" } ], "flagged": false, "summary": "Windows: BackgroundColor won't get applied when touchEnabled=false", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "SDK 6.1.1\r\nCLI 6.2.2\r\nMicrosoft Windows 10 Pro\r\n10.0.15063\r\n64bit", "closedSprints": [ { "id": 933, "state": "closed", "name": "2017 Sprint 16 SDK", "startDate": "2017-07-30T16:17:10.306Z", "endDate": "2017-08-13T16:17:00.000Z", "completeDate": "2017-08-13T23:06:34.398Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "425229", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "It turns out that the root problem is {{backgroundColor}} doesn't get applied when it is used with `touchEnabled=false`. I would change the title of this ticket then.\r\n\r\nSample code:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'blue'\r\n});\r\nvar view = Ti.UI.createView({\r\n width: 5,\r\n height: 5,\r\n touchEnabled: false,\r\n backgroundColor: 'green'\r\n});\r\n\r\nwin.addEventListener('open', function () {\r\n view.width = 50;\r\n view.height = 50;\r\n view.backgroundColor = 'red';\r\n});\r\n\r\nwin.add(view);\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-08-02T02:20:51.000+0000", "updated": "2017-08-02T02:20:51.000+0000" }, { "id": "425255", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/1057", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-08-02T10:23:49.000+0000", "updated": "2017-08-02T10:23:49.000+0000" }, { "id": "425345", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~kiguchi]Will this ticket need a back-port to 6_2_X ?", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-02T21:22:43.000+0000", "updated": "2017-08-02T21:22:43.000+0000" }, { "id": "425384", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1058", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-08-02T23:14:21.000+0000", "updated": "2017-08-02T23:14:21.000+0000" }, { "id": "425849", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~smohammed] Backported to 6_2_X. No tests needed for 6_2_X because currently {{6_2_X}} branch and {{master}} are pretty much same. Should be ok to close this ticket.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-08-04T01:07:48.000+0000", "updated": "2017-08-04T01:07:48.000+0000" }, { "id": "426714", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix in SDK Version 7.0.0.v20170815065413 and SDK Version: 6.2.0.v20170811022027\r\n\r\nTest and other information can be found at:\r\n\r\nMaster: https://github.com/appcelerator/titanium_mobile_windows/pull/1059\r\n6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1072\r\nhttps://github.com/appcelerator/titanium_mobile_windows/pull/1074", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-15T21:40:52.000+0000", "updated": "2017-08-15T21:40:52.000+0000" }, { "id": "426721", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "^UPDATE:\r\nMaster: https://github.com/appcelerator/titanium_mobile_windows/pull/1057\r\n6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1058", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-15T22:21:46.000+0000", "updated": "2017-08-15T22:21:46.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }