{ "id": "114484", "key": "TIMOB-13909", "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": null, "resolutiondate": null, "created": "2013-05-16T20:47:06.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "actionbar", "android", "identifier", "menuitem" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:55.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Problem*\r\nMenuItem has only title as a identifier on the click event. This is a very bad idea, when you are building multi language apps. With any other Ti Proxy object, I get the id and all the custom properties in the e.source object. \r\n\r\n*Steps to reproduce*\r\n1. Run test case on Android\r\n2. Open the menu - on the emulator this can be done with the circular \"Menu\" button\r\n3. Click the item, observe that e.source.customProp returns \"undefined\"\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tfullscreen : true\r\n});\r\n\r\nvar activity = win.activity;\r\n\r\nactivity.onCreateOptionsMenu = function(e) {\r\n\tvar menu = e.menu;\r\n\tvar menuItem = menu.add({\r\n\t\ttitle : \"Item 1\",\r\n\t\ticon : \"KS_nav_ui.png\",\r\n\t\tshowAsAction : Ti.Android.SHOW_AS_ACTION_IF_ROOM,\r\n\t\tcustomProp: \"test\"\r\n\t});\r\n\tmenuItem.addEventListener(\"click\", function(e) {\r\n\t\tTi.API.info(\"e.source.title: \" + e.source.title);\r\n\t\tTi.API.info(\"e.source.customProp: \" + e.source.customProp); // Does not work\r\n\t});\r\n};\r\n\r\nwin.open();\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: MenuItem has no id in click event", "creator": { "name": "viezel", "key": "viezel", "displayName": "Mads Moller", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "viezel", "key": "viezel", "displayName": "Mads Moller", "active": true, "timeZone": "Europe/Berlin" }, "environment": "3.1.0.GA", "comment": { "comments": [ { "id": "252668", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on Android 4.1.2 x86 emulator with Ti SDK 3.1 GA and 3.2 CI.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T22:20:08.000+0000", "updated": "2013-05-17T22:20:08.000+0000" }, { "id": "273336", "author": { "name": "vlucas", "key": "vlucas", "displayName": "Vance Lucas", "active": true, "timeZone": "America/Chicago" }, "body": "I just ran into this same issue myself. This is contrary to my expectations and is highly annoying.", "updateAuthor": { "name": "vlucas", "key": "vlucas", "displayName": "Vance Lucas", "active": true, "timeZone": "America/Chicago" }, "created": "2013-09-30T04:15:13.000+0000", "updated": "2013-09-30T04:15:13.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }