{ "id": "172959", "key": "TIMOB-26797", "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": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-03-01T05:37:32.000+0000", "created": "2019-02-05T07:28:27.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-03-01T15:47:08.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": "{{removeEventListener}} removes wrong callback. If module has multiple callbacks with same name, {{removeEventListener}} always removes first one only.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar func1 = function () {\r\n Ti.API.info('open callback 1');\r\n};\r\n\r\nvar func2 = function () {\r\n Ti.API.info('open callback 2');\r\n};\r\n\r\nvar func3 = function () {\r\n Ti.API.info('open callback 3');\r\n};\r\n\r\n\r\nwin.addEventListener('open', func1);\r\nwin.addEventListener('open', func1);\r\nwin.addEventListener('open', func2);\r\nwin.addEventListener('open', func2);\r\nwin.addEventListener('open', func3);\r\nwin.addEventListener('open', func3);\r\n\r\nwin.removeEventListener('open', func2);\r\n\r\nwin.open();{code}\r\n\r\nActual: {{func1}} called once and {{func2}} & {{func3}} are called twice.\r\nExpected: all {{func2}} should be removed and {{func1}} & {{func3}} should be called twice.\r\n", "attachment": [], "flagged": false, "summary": "Windows: removeEventListener removes wrong callback", "creator": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1109, "state": "closed", "name": "2019 Sprint 3", "startDate": "2019-01-28T17:38:43.075Z", "endDate": "2019-02-09T17:38:00.000Z", "completeDate": "2019-02-08T21:37:29.498Z", "originBoardId": 114 }, { "id": 1118, "state": "closed", "name": "2019 Sprint 5", "startDate": "2019-02-24T18:36:06.435Z", "endDate": "2019-03-08T18:36:00.000Z", "completeDate": "2019-03-07T22:19:47.057Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "445862", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/1354", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-02-05T23:13:04.000+0000", "updated": "2019-02-05T23:13:04.000+0000" }, { "id": "446373", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR passed. removeEventListener works as expected.waiting for resolving Jenkins test failure to merge\r\n", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-02-27T20:37:10.000+0000", "updated": "2019-02-27T22:02:40.000+0000" }, { "id": "446434", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-03-01T05:37:32.000+0000", "updated": "2019-03-01T05:37:32.000+0000" }, { "id": "446444", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, fix verified in SDK version 8.1.0.v20190301040201.\r\n\r\nTest and other information can be found at: \r\nhttps://github.com/appcelerator/titanium_mobile_windows/pull/1354", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-03-01T15:47:00.000+0000", "updated": "2019-03-01T15:47:00.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }