{ "id": "84065", "key": "TIMOB-6767", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2012-03-27T13:48:49.000+0000", "created": "2011-12-19T15:40:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "14292", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "83951", "key": "TIMOB-6711", "fields": { "summary": "iOS: Disappearing events in views/elements nested in ScrollViews", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14336", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "84166", "key": "TIDOC-206", "fields": { "summary": "APIDoc: Improve documentation for views which do not have specific events", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-27T13:48:49.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": "h4. PROBLEM DESCRIPTION\r\nIf you have a tabbedbar inside a view, the view won't get the events, like singletap.\r\n\r\nh4. STEPS TO REPRODUCE\r\n1. Create a new mobile project\r\n2. Paste the code below into app.js\r\n3. Singletap on the buttons of the tabbedbar.\r\n\r\nh4. ACTUAL RESULTS\r\nThe singletap event is not fired.\r\n\r\nh4. EXPECTED RESULTS\r\nSingletap event should be fired. \r\n\r\nh4. CODE\r\n\r\n{code:title=app.js|borderStyle=solid}\r\nvar win = Ti.UI.createWindow();\r\nvar view = Ti.UI.createView({\r\n\ttouchEnabled: true,\r\n}); \r\nvar bb1 = Titanium.UI.createTabbedBar({ \r\n\tlabels:['One', 'Two', 'Three'], \r\n\tbackgroundColor:'#336699', \r\n\ttop:50, \r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BAR, \r\n\theight:25, \r\n\twidth:200 }); \r\n\t\r\nview.add(bb1);\r\nview.addEventListener('singletap',function(){\r\n\tTi.API.info('Event singletap was fired!');\r\n});\r\nwin.add(view);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Disappearing events in tabbedbar nested in Views", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": null, "comment": { "comments": [ { "id": "176909", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there a specific reason why the \"singletap\", and not the \"click\" event, must be used? This code could be replaced with the following:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nvar view = Ti.UI.createView({\r\n\ttouchEnabled: true,\r\n}); \r\nvar bb1 = Titanium.UI.createTabbedBar({ \r\n\tlabels:['One', 'Two', 'Three'], \r\n\tbackgroundColor:'#336699', \r\n\ttop:50, \r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BAR, \r\n\theight:25, \r\n\twidth:200 }); \r\n\t\r\nview.add(bb1);\r\n\r\nfunction tapListener(event) {\r\n // ... event processing here, where you can:\r\n // 1. Switch on the source\r\n // 2. Switch on the event type\r\n}\r\n\r\nview.addEventListener('singletap',tapListener);\r\nbb1.addEventListener('click',tapListener);\r\n\r\nwin.add(view);\r\nwin.open();\r\n{code}\r\n\r\nOr even simply listen for the {{click}} event on the view, which will pick up control changes on the tab bar (and is triggered as soon as the control changes value). In practice there tends to be little difference between {{singletap}} and {{click}}.\r\n\r\nInternally, iOS may not give us enough information on the {{singletap}} event to be able to reliably report the currently selected button in the control (in particular, {{singletap}} may be fired before the value is changed). We may not even be able to get {{singletap}} from the underlying control due to its native behavior.\r\n\r\nThis bug indicates that our documentation needs to be updated to indicate where specific views may not support specific events.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-21T13:21:08.000+0000", "updated": "2011-12-21T13:22:29.000+0000" }, { "id": "176911", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note that this comment applies only if the information from the {{click}} event (the currently selected button index) is required. Certain events may not be bubbling up as expected, which is a genuine bug.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-21T13:25:41.000+0000", "updated": "2011-12-21T13:25:41.000+0000" }, { "id": "176915", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Won't fix; checked and saw that the events required for processing 'singletap' don't even bubble up from the underlying control.\r\n\r\nGoing to create a doc bug for improving documentation of views which do (and do not) handle specific events, and among those, which include additional information as part of the event.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-21T13:39:33.000+0000", "updated": "2011-12-21T13:39:33.000+0000" }, { "id": "176916", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Filed bug TIMOB-6825 for improving our documentation regarding event listeners.\r\n\r\nUnfortunately, generating parity information for event handling on iOS is not particularly easy outside of an app we can run to pump events through specific elements (probably the same for Android).", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-21T13:44:28.000+0000", "updated": "2011-12-21T13:44:28.000+0000" }, { "id": "180187", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As per Steven, cannot address. closing.", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-23T11:08:31.000+0000", "updated": "2012-01-23T11:08:31.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }