{ "id": "85873", "key": "TIMOB-7526", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-03-01T13:02:39.000+0000", "created": "2012-02-02T15:52:40.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:17:21.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": "h3.Description\r\nTi.UI.Button glows when it is being clicked if it has backgroundImage set.\r\n\r\nh6.Reproduction steps\r\nStep 1: Make sure the image by default is located into your Resources folder\r\nStep 2: run the code below\r\nStep 3: click the button\r\nStep 4: notice that that button glows when it is being clicked\r\n\r\nh6.Expected behavior\r\nVisual feedback instead of glow should actually be a \"grey overlay on top of the non-transparent areas\" as per earlier TiSDKs\r\n\r\nh6.Tested on\r\nTiSDK > 1.8.1\r\nTiSDK > 1.9.0.v20120126104634\r\n\r\nh6.Repro steps\r\n{code:title=app.js}\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'black'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n width: 100,\r\n height: 50,\r\n backgroundImage: 'KS_nav_ui.png',\r\n //backgroundSelectedImage:'KS_nav_views.png',\r\n //backgroundFocusedImage:''\r\n});\r\n\r\nbutton.addEventListener('click', function(){ \r\n\tTi.API.info(\"clicked\"); \r\n});\r\n\r\nwin1.add(button);\r\n\r\nwin1.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Button - setting backgroundImage causes the button to glow when it is clicked", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": " Titanium SDK: Mobile CI 1.8.1, 1.9\r\n Platform OS: iOS\r\n Platform OS Version: 5.0\r\n", "comment": { "comments": [ { "id": "184816", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is a side effect of the fix for TIMOB-5803 which was a parity issue with android. The \"gray overlap\" effect is only available if the backgroundSelectedImage property is not set. Right now it is always set to the backgroundImage. This behavior is documented. The \"glow\" feedback is enabled when the backgroundSelectedImage property is not set or is the same as backgroundImage property. Please use the backgroundSelectedImage to set up a different image for background when the button is highlighted. ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-01T12:49:56.000+0000", "updated": "2012-03-01T12:49:56.000+0000" }, { "id": "185297", "author": { "name": "d4v1d", "key": "d4v1d", "displayName": "David Knell", "active": true, "timeZone": "America/New_York" }, "body": "Vishal,\r\nThat is incorrect according to the [documentation|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.iPhone.SystemButtonStyle-object.html]. It states that the glow effect should only occur if a button is added to a toolbar and has style set to Titanium.UI.iPhone.SystemButtonStyle.PLAIN.\r\n\r\n{quote}\r\nWhen you add a button to a Toolbar, the styles have a slightly different effect:\r\n* PLAIN Button style for an undecorated button with large text and a glow effect when the button is pressed. Default style for buttons in toolbars.\r\n* BORDERED. Simple button style with a rounded border and a light blue background.\r\n* DONE. Like the bordered button, but with a dark blue background.\r\n{quote}\r\n\r\nThis behavior does not coincide with the documentation and it only started occurring in 1.8.1 and up. This needs to be fixed ASAP. Using 1.8.1 or 1.8.2, results in all buttons in an app being obstructed by this glow effect.", "updateAuthor": { "name": "d4v1d", "key": "d4v1d", "displayName": "David Knell", "active": true, "timeZone": "America/New_York" }, "created": "2012-03-06T18:34:27.000+0000", "updated": "2012-03-06T18:34:27.000+0000" }, { "id": "186031", "author": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After comparing the current functionality to the documentation, here's the current state of affairs:\r\n\r\n1) In 1.7.5:\r\n\r\n - if backgroundImage is specified, backgroundSelectedImage is not specified, and *no style is specified* you get the grey overlay effect. (Bordered style comes with its own highlight effect.)\r\n\r\n - if backgroundImage and backgroundSelectedImage are specified as the same image, you get no effect.\r\n\r\n - If backgroundImage and backgroundSelectedImage are specified as different images, you get a fully custom effect.\r\n\r\n3) In 1.8.0.1, you got neither the grey overlay effect nor the glow effect in any of the above scenarios.\r\n\r\n4) In 1.8.1 and newer, it's a little different:\r\n\r\n - If backgroundImage is specified and backgroundSelectedImage is *not* specified, you get the \r\n \"glow\" effect. This is because (for parity reasons) setting a backgroundImage now sets\r\n the backgroundSelected image as well, as on Android. With both images set the same, you see\r\n the \"glow\" effect that appears on many native iOS buttons.\r\n\r\n - If backgroundImage is specified and you set backgroundSelectedImage to null, you get the\r\n grey overlay effect seen in 1.7.5.\r\n\r\n - If you explicitly set the images for each button state, you get a fully-custom button, as\r\n before.\r\n", "updateAuthor": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-12T12:04:39.000+0000", "updated": "2012-03-12T12:09:19.000+0000" }, { "id": "186151", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "body": "In 1.8.0.1\r\n* If backgroundImage is specified and backgroundFocusedImage is ''(blank string), you get the grey overlay effect", "updateAuthor": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2012-03-13T03:59:06.000+0000", "updated": "2012-03-13T04:07:09.000+0000" }, { "id": "415656", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:17:21.000+0000", "updated": "2017-03-24T18:17:21.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }