{ "id": "164662", "key": "TIMOB-24169", "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": "18154", "name": "Release 6.0.1", "archived": false, "released": true, "releaseDate": "2016-12-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-11-30T10:34:47.000+0000", "created": "2016-11-23T18:59:42.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "backgroundtopcap", "button", "ios", "regression" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-12-16T16:14:30.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": "I just upgraded to Ti SDK *6.0.0.GA* coming from 5.4.0.GA and I noticed that using {{backgroundLeftCap}} and {{backgroundTopCap}} are broken on {{Ti.UI.Button}} but works fine on {{Ti.UI.View}}. It used to work both in 5.4.0.\r\n\r\nThe issue is easy to reproduce with the following code, I supplied a background png in the attachment.\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\nvar container = Ti.UI.createView({\r\n\ttop:100,\r\n\tlayout:'vertical',\r\n\twidth:450\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttop:0,\r\n\tbackgroundImage:'button_background.png',\r\n\tbackgroundTopCap:50,\r\n\tbackgroundLeftCap:50,\r\n\twidth:450,\r\n\theight:100\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\ttop:50,\r\n\tbackgroundImage:'button_background.png',\r\n\tbackgroundTopCap:50,\r\n\tbackgroundLeftCap:50,\r\n\twidth:450,\r\n\theight:100\r\n});\r\n\r\ncontainer.add(button);\r\ncontainer.add(view);\r\nwin.add(container);\r\nwin.open();\r\n{code}", "attachment": [ { "id": "60770", "filename": "button_background.png", "author": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-23T18:58:09.000+0000", "size": 4182, "mimeType": "image/png" }, { "id": "60771", "filename": "Simulator Screen Shot 23 Nov 2016, 20.35.09.png", "author": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-23T19:35:19.000+0000", "size": 34995, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: backgroundTopCap + backgroundLeftCap broken on Ti.UI.Button in 6.0.0.GA (Regression)", "creator": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "401768", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey there, iOS or Android? We will then test if it's 5.5.x or 6.x that caused it. Thx! *EDIT*: I was able to reproduce it on iOS, and it works in 5.5.1, so it's a 6.0.0 regression. Moving for further investigation.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-23T19:32:01.000+0000", "updated": "2016-11-23T19:35:19.000+0000" }, { "id": "401769", "author": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi, as far as I know these properties are only supported on iOS :)\r\n\r\nIf not, then I mean iOS.", "updateAuthor": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-23T19:34:32.000+0000", "updated": "2016-11-23T19:34:32.000+0000" }, { "id": "401771", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~vijaysingh] This is a regression caused by [this change]https://github.com/appcelerator/titanium_mobile/commit/7ee97f46b21ab05434d3c588e1ae24450a6eb5f0] in TIMOB-23666. I noticed three things:\r\n# We need to restore the {{[self loadImage:value]}}, since it handles much more than just loading (e.g. scaling and stretching)\r\n# We still need to support remote images, for example by something like this:\r\n{code:objc}\r\n if (!backgroundImageCache) {\r\n NSURL *bgURL = [TiUtils toURL:value proxy:[self proxy]];\r\n backgroundImageCache = [[ImageLoader sharedLoader] loadImmediateImage:bgURL];\r\n if (backgroundImageCache == nil) {\r\n backgroundImageCache = [[[ImageLoader sharedLoader] loadRemote:bgURL] retain];\r\n } else {\r\n [backgroundImageCache retain];\r\n }\r\n }\r\n{code}\r\n# The same applies for {{setBackgroundSelectedImage_}}, {{setBackgroundDisabledImage_}} and {{setBackgroundFocusedImage_}} which currently don't support remote images when they are not in the cache already.\r\n\r\nSo we would need to come up with a solution that covers all those use-cases together.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-23T19:56:28.000+0000", "updated": "2016-11-23T19:57:04.000+0000" }, { "id": "401837", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This change will affect background image setting for TIUIiOSToolbar, TIUISearchbar, TIUITabGroup, TiUITextField and TIUIiOSStepper and TIUIButton's all state(selected , highlighted etc).\r\n If images are not cached, it will download image from remote .\r\n\r\nPR : https://github.com/appcelerator/titanium_mobile/pull/8635\r\n\r\nIn above solution [TiUtils loadBackgroundImage:image forProxy:[self proxy]];\r\nalready return image but we are not using it for capping . Rather we use\r\n[[ImageLoader sharedLoader] loadImmediateStretchableImage:url withLeftCap:leftCap topCap:topCap]; [ImageCacheEntry stretchableImage] which internally call for capped image which again get image from cache.\r\n\r\nIdeal solution is, \r\n -(UIImage *)stretchableImage should be available as extension of UIImage.\r\nWe should use image from [TiUtils loadBackgroundImage:image forProxy:[self proxy]]; and call -[UIImage stretchableImage] ;\r\n\r\n[~hansknoechel] Let me know your comment .", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-25T07:11:10.000+0000", "updated": "2016-11-25T07:30:30.000+0000" }, { "id": "401985", "author": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can an estimate be given when this release will be done? We're getting close to our deadline and I have to make a decision if I will use 6.0.0.GA, because without this, I simply can not.", "updateAuthor": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-29T09:48:38.000+0000", "updated": "2016-11-29T09:48:38.000+0000" }, { "id": "402225", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~gertjans] This ticket is in review for 6.0.1 which will be released in early December. In the meantime, you could either patch your SDK with the provided commit or rollback [this commit|https://github.com/appcelerator/titanium_mobile/commit/7ee97f46b21ab05434d3c588e1ae24450a6eb5f0].", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-29T22:48:37.000+0000", "updated": "2016-11-29T22:48:37.000+0000" }, { "id": "402252", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reverted changes of TIMOB-23666 for 6_0_x .\r\nPR(6_0_x) : https://github.com/appcelerator/titanium_mobile/pull/8643", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-30T09:46:52.000+0000", "updated": "2016-11-30T09:46:52.000+0000" }, { "id": "402258", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Fixed by reverting the remote-images changes from TIMOB-23666 for now.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-30T10:34:47.000+0000", "updated": "2016-11-30T10:34:47.000+0000" }, { "id": "402300", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with this environment:\r\nNPM Version: 2.15.9\r\nNode Version: 4.5.0\r\nMac OS: 10.12.1\r\nAppc CLI: 6.0.0\r\nAppc CLI NPM: 4.2.8\r\nTitanium SDK version: 6.0.1.v20161130023500\r\nAppcelerator Studio, build: 4.8.0.201611121409\r\nXcode 8.1 GM\r\nDevice: iOS 10.0\r\n\r\nI was able to reproduce the issue with SDK 6.0.0 GA. I tried the demo code with SDK 5.5.1 GA and did not see the issue; verifying that the regression is with 6.0.0 GA. I then tried the demo code on both Simulator and Device and verified that the bug is fixed with SDK 6.0.1.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-01T00:22:22.000+0000", "updated": "2016-12-01T00:22:22.000+0000" }, { "id": "403507", "author": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "body": "When does early december end ;) ?", "updateAuthor": { "name": "gertjans", "key": "gertjans", "displayName": "Gertjan Smits", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-16T14:51:02.000+0000", "updated": "2016-12-16T14:51:02.000+0000" }, { "id": "403512", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~gertjans] Xcode 8.2 came along earlier than expected :-) A release before Christmas is still scheduled!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-16T16:14:30.000+0000", "updated": "2016-12-16T16:14:30.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }