{ "id": "148551", "key": "TIMOB-18979", "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": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-06-11T05:12:06.000+0000", "created": "2015-06-05T23:58:17.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "qe-4.1.0" ], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-06-24T05:17:53.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": "h5.Description\r\n\r\nWhen creating a button and adding it to a window the button does not show, unless it is tapped.\r\n\r\n*This code works with no issues on an Android device*\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\n\r\nvar button = Titanium.UI.createButton({\r\n top: 60,\r\n title: 'Hello',\r\n width: '180',\r\n height: '80',\r\n image: '/KS_nav_ui.png'\r\n});\r\n\r\n\r\nbutton.addEventListener('click', function(){\r\n alert('HELLO!');\r\n});\r\n\r\nwin.add(button);\r\nwin.open();\r\n{code}\r\n\r\nh5.Steps To Reproduce\r\n\r\n1. Replace the code in an app.js file with the above\r\n2. Build the app to device using {{appc run -p windows -T device}} or {{ti build -p windows -T device}}\r\n3. Tap in the middle of the screen in the top third of the screen\r\n\r\nh5.Actual Result\r\n\r\nThe button is not visible until tapped\r\n\r\nh5.Expected Result\r\n\r\nThe button should be visible at all times", "attachment": [], "flagged": false, "summary": "Windows: Button is not shown until tapped when backgroundColor is set on a window", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Windows 8.1\r\nAppc CLI(NPM):4.0.0\r\nAppc CLI(Registry): 4.0.1\r\nTitanium SDK: 4.1.0.v20150604094312\r\nLumia 1020: 8.1", "closedSprints": [ { "id": 420, "state": "closed", "name": "2015 Sprint 12 Windows", "startDate": "2015-06-07T01:15:19.706Z", "endDate": "2015-06-21T01:15:00.000Z", "completeDate": "2015-06-20T23:02:18.410Z", "originBoardId": 144 } ], "comment": { "comments": [ { "id": "354712", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "I believe this is actually that certain UI elements are not being shown when added to a tabgroup, for example if I replace the above code with the below the button is shown with no problems. I have also seen behavior similar to this issue when attempting to add a tableview to a tab group\r\n\r\n{code}\r\nTi.UI.backgroundColor = 'white';\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar button = Ti.UI.createButton({\r\n title: 'Hello'\r\n})\r\n\r\nbutton.addEventListener('click', function(){\r\n alert('Hello');\r\n})\r\n\r\nwin.add(button);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-06-10T00:12:27.000+0000", "updated": "2015-06-10T00:12:27.000+0000" }, { "id": "354821", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~eharris] When you say \"tab group\", that means {{Ti.UI.TabGroup}}, right? Would you add a sample code which uses it?", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-10T23:44:07.000+0000", "updated": "2015-06-10T23:44:07.000+0000" }, { "id": "354824", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~kota] It appears I was wrong about it being a TabGroup, I think it's when the backgroundColor is set for a window. I'll rework the ticket to reflect this\r\n*This code does not show a button*,\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\n \r\nvar button = Ti.UI.createButton({\r\n title: 'Hello'\r\n})\r\n \r\nbutton.addEventListener('click', function(){\r\n alert('Hello');\r\n})\r\n \r\nwin.add(button);\r\nwin.open();\r\n{code}\r\n\r\n*This code does*\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n \r\nvar button = Ti.UI.createButton({\r\n title: 'Hello'\r\n})\r\n \r\nbutton.addEventListener('click', function(){\r\n alert('Hello');\r\n})\r\n \r\nwin.add(button);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-06-11T00:00:34.000+0000", "updated": "2015-06-11T00:00:34.000+0000" }, { "id": "354825", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The reason because Button looks like invisible is that the color of {{Window}} is white, and {{Button}} text color is white by default in this case. \r\n\r\n* Window background color is white\r\n* Button background is transparent (thus it shows Window background color = white)\r\n* Button text color is white by default\r\n* When you tap the button, Button shows \"selected\" color, which is blue\r\n* Which makes looking like Buttons are suddenly visible\r\n\r\nSample code:\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'red' });\r\n\r\nvar button = Titanium.UI.createButton({\r\n top: 60,\r\n title: 'Hello',\r\n width: '180',\r\n height: '80',\r\n image: '/KS_nav_ui.png'\r\n});\r\n\r\nbutton.addEventListener('click', function () {\r\n alert('HELLO!');\r\n});\r\n\r\nwin.add(button);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-11T00:07:19.000+0000", "updated": "2015-06-11T00:07:19.000+0000" }, { "id": "354847", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-11T05:12:06.000+0000", "updated": "2015-06-11T05:12:06.000+0000" }, { "id": "354850", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PS. The reason why they look different between Android and Windows is that because the difference of UI color scheme. I believe Titanium should leverage each platform's color scheme, so it may look different. In this case Windows has its own scheme which treats Button background transparent and default text color is white, which causes \"look\" different between platforms. I think this is the way how Titanium works.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-11T05:26:51.000+0000", "updated": "2015-06-11T05:26:51.000+0000" }, { "id": "355794", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~eharris] Please close if in agreement, otherwise provide details on why this shouldn't be closed as invalid.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-23T19:55:25.000+0000", "updated": "2015-06-23T19:55:25.000+0000" }, { "id": "355840", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~kota] thanks for the heads up, Titanium should adhere to each platforms color scheme so I'll close this ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-06-24T05:17:49.000+0000", "updated": "2015-06-24T05:17:49.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }