{ "id": "161168", "key": "TIMOB-23615", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-07-06T02:34:22.000+0000", "created": "2016-06-17T08:45:27.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-07-06T15:52: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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "1. Add eventListener to ImageView\r\n2. Click ImageView\r\n3. Remove eventListener\r\n4. Add same eventListener again.\r\n5. Click ImageView\r\n6. Notice that the last click event will not be fired\r\n\r\nindex.xml\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nindex.js\r\n{code}\r\nvar imgview = Ti.UI.createImageView({height:100, width:100, image:'images/nav_backicon.png', top:10});\r\n$.win.add(imgview);\r\n\r\nimgview.addEventListener('click', clickListener);\r\nTi.API.info(\"added listener 1\");\r\n\r\nfunction clickListener(e) {\r\n\talert(\"clicked\");\r\n\timgview.removeEventListener('click', clickListener);\r\n\t\r\n\tsetTimeout(function () {\r\n\t\timgview.addEventListener('click', clickListener);\r\n\t\tTi.API.info(\"added listener 2\");\r\n\t}, 2000);\r\n}\r\n$.win.open();\r\n{code}", "attachment": [ { "id": "59587", "filename": "nav_backicon.png", "author": { "name": "jonasbjurhult", "key": "jonasbjurhult", "displayName": "Jonas Bjurhult", "active": true, "timeZone": "Europe/Stockholm" }, "created": "2016-06-17T08:45:18.000+0000", "size": 353, "mimeType": "image/png" } ], "flagged": false, "summary": "Windows: Problem adding eventlistener twice to Ti.UI.ImageView ", "creator": { "name": "jonasbjurhult", "key": "jonasbjurhult", "displayName": "Jonas Bjurhult", "active": true, "timeZone": "Europe/Stockholm" }, "subtasks": [], "reporter": { "name": "jonasbjurhult", "key": "jonasbjurhult", "displayName": "Jonas Bjurhult", "active": true, "timeZone": "Europe/Stockholm" }, "environment": "SDK 6.0.0.v20160616195531", "closedSprints": [ { "id": 678, "state": "closed", "name": "2016 Sprint 14 SDK", "startDate": "2016-07-02T00:25:57.921Z", "endDate": "2016-07-16T00:25:00.000Z", "completeDate": "2016-07-18T03:18:29.729Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "389945", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "I can reproduce the behaviour described on:\r\n\r\nWindows 10 Pro\r\nTi SDK: 5.3.0.GA, 5.4.0.v20160704082523\r\nAppc NPM: 4.2.7-2 \r\nAppc CLI: 5.4.0-26\r\nAppc Studio: 4.7.0.201606220541\r\n\r\n\r\n{code:title=Classic test case}\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar imgview = Ti.UI.createImageView({\r\n\timage: 'Logo.png'\t\r\n});\r\n\r\nimgview.addEventListener('click', clickListener);\r\nTi.API.info(\"added listener 1\");\r\n \r\nfunction clickListener(e) {\r\n\talert(\"clicked\");\r\n\timgview.removeEventListener('click', clickListener);\r\n\tsetTimeout(function () {\r\n\t\timgview.addEventListener('click', clickListener);\r\n\t\tTi.API.info(\"added listener 2\");\r\n\t}, 2000);\r\n}\r\n\r\nwin.add(imgview);\r\nwin.open();\r\n\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-07-05T15:43:58.000+0000", "updated": "2016-07-05T15:43:58.000+0000" }, { "id": "389956", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/768\r\nhttps://github.com/appcelerator/titanium_mobile_windows/pull/769", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-06T02:21:53.000+0000", "updated": "2016-07-06T02:21:53.000+0000" }, { "id": "389957", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pushing this to 5.4.0 because it's critical.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-06T02:34:22.000+0000", "updated": "2016-07-06T02:34:22.000+0000" }, { "id": "389975", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nWindows 10 Pro\r\nTi SDK: 5.4.0.v20160705213725\r\nAppc NPM: 4.2.7-2 \r\nAppc CLI: 5.4.0-26\r\nAppc Studio: 4.7.0.201606220541\r\nLumia 930: 10.0\r\nLumia 520 : 8.1\r\n\r\nThe code sample attached now works as expected.\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-07-06T15:52:45.000+0000", "updated": "2016-07-06T15:52:45.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }