{ "id": "171873", "key": "TIMOB-26177", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-09-26T17:07:40.000+0000", "created": "2018-07-03T00:04:40.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "blur", "bubble", "focus", "parity" ], "versions": [], "issuelinks": [ { "id": "56663", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "171864", "key": "TIMOB-26172", "fields": { "summary": "Android: \"focus\" and \"blur\" events bubbles to parent views when it shouldn't", "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": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-09-26T17:26:52.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": "*Summary:*\r\nA view's {{focus}} and {{blur}} events are not supposed to bubble up to the view's parents according to our documentation here...\r\nhttps://docs.appcelerator.com/platform/latest/#!/guide/Event_Handling-section-src-29004896_EventHandling-Bubblingandnon-bubblingevents\r\n\r\nOn Windows, they do bubble up. This can cause confusion since these events will bubble up to the window which use the {{focus}} and {{blur}} events to indicate if the window is active, not if it has gained/received input focus.\r\n\r\nThis is not an issue on iOS.\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below code on Windows.\r\n# If the TextField has the focus, then tap on the \"Remove Focus\" button.\r\n# Tap on the \"Set Focus\" button.\r\n# In the log, notice that the TextField focus event's \"bubbles\" property is set true. This is wrong.\r\n# In the log, notice the Window received a focus event after the TextField did. This is wrong.\r\n# Tap on the \"Remove Focus\" button.\r\n# In the log, notice that the TextField blur event's \"bubbles\" property is set true. This is wrong.\r\n# In the log, notice the Window received a blur event after the TextField did. This is wrong.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow({\r\n\tlayout: \"vertical\",\r\n});\r\nvar textField = Ti.UI.createTextField({\r\n\tvalue: \"Focus Test\",\r\n\twidth: Ti.UI.FILL,\r\n\theight: Ti.UI.SIZE,\r\n});\r\ntextField.addEventListener(\"focus\", function(e) {\r\n\tTi.API.info(\"@@@ TextField 'focus' event received. bubbles: \" + e.bubbles);\r\n});\r\ntextField.addEventListener(\"blur\", function(e) {\r\n\tTi.API.info(\"@@@ TextField 'blur' event received. bubbles: \" + e.bubbles);\r\n});\r\nwindow.add(textField);\r\nvar focusButton = Ti.UI.createButton({ title: \"Set Focus\" });\r\nfocusButton.addEventListener(\"click\", function(e) {\r\n\ttextField.focus();\r\n});\r\nwindow.add(focusButton);\r\nvar blurButton = Ti.UI.createButton({ title: \"Remove Focus\" });\r\nblurButton.addEventListener(\"click\", function(e) {\r\n\ttextField.blur();\r\n});\r\nwindow.add(blurButton);\r\nwindow.addEventListener(\"focus\", function(e) {\r\n\tTi.API.info(\"@@@ Window 'focus' event received.\");\r\n});\r\nwindow.addEventListener(\"blur\", function(e) {\r\n\tTi.API.info(\"@@@ Window 'blur' event received.\");\r\n});\r\nwindow.open();\r\n{code}\r\n\r\n*Expected Result:*\r\nThe {{focus}} and {{blur}} events should not not bubble. Their {{bubbles}} property should be {{false}} and the parent window should not have received the TextField's events.\r\n", "attachment": [], "flagged": false, "summary": "Windows: \"focus\" and \"blur\" events bubbles to parent views when it shouldn't", "creator": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1073, "state": "closed", "name": "2018 Sprint 19 SDK", "startDate": "2018-09-09T21:02:56.422Z", "endDate": "2018-09-23T21:02:00.000Z", "completeDate": "2018-09-23T22:28:10.932Z", "originBoardId": 114 }, { "id": 1078, "state": "closed", "name": "2018 Sprint 20 SDK", "startDate": "2018-09-23T16:57:58.349Z", "endDate": "2018-10-07T16:57:00.000Z", "completeDate": "2018-10-07T23:31:40.476Z", "originBoardId": 114 }, { "id": 1065, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2018-08-13T17:39:36.846Z", "endDate": "2018-08-27T17:39:00.000Z", "completeDate": "2018-08-29T16:10:57.013Z", "originBoardId": 114 }, { "id": 1070, "state": "closed", "name": "2018 Sprint 18 SDK", "startDate": "2018-08-26T16:14:35.297Z", "endDate": "2018-09-09T16:14:00.000Z", "completeDate": "2018-09-11T20:59:21.495Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "439807", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/1276", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T08:01:15.000+0000", "updated": "2018-08-06T08:01:15.000+0000" }, { "id": "442039", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. PR merged", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-09-25T20:45:15.000+0000", "updated": "2018-09-25T22:28:49.000+0000" }, { "id": "442075", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 7.5.0.v20180925150848.Focus and blur events not bubbles. Closing\r\n {code}\r\n Name = Microsoft Windows 10 Pro\r\n Version = 10.0.17134\r\n Architecture = 64bit\r\n Node.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 7.5.0.v20180925150848\r\nDevice\r\nLumia 650 dual sim\r\nMobile emulator 10.0.14393 1080p\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T17:26:45.000+0000", "updated": "2018-09-26T17:26:45.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }