{ "id": "92910", "key": "TIMOB-9428", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-06-14T16:36:11.000+0000", "created": "2012-06-06T16:10:02.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:30:02.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\nTextfield events are not getting fired properly in mobileweb. You got stuck into focus event. \r\n\r\nh4. Actual Results\r\nThe alert is stuck in focus event. \r\n\r\nh4. Expected results\r\nThe events working as in iOS.\r\n\r\nh4. Testcase\r\n1. Create new mobile project.\r\n2. Add app.js\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n\t\t\t\t\tbackgroundColor:'#000',\r\n\t\t\t\t\ttop:0\r\n\t\t\t\t});\r\n\r\nvar inputTextField = Titanium.UI.createTextField({\r\n color : '#ff7c00',\r\n top:10,\r\n height : 50,\r\n width : '25%',\r\n left : '10%',\r\n borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n keyboardType : Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION,\r\n returnKeyType : Titanium.UI.RETURNKEY_DONE,\r\n font : {\r\n fontSize : 20,\r\n fontColor : '#ff7c00',\r\n fontWeight : 'bold',\r\n fontFamily : 'Helvetica Neue'\r\n }\r\n });\r\ninputTextField.addEventListener('focus',function(){\r\n\talert('focus')\r\n});\r\ninputTextField.addEventListener('blur',function(){\r\n\talert('blur')\r\n});\r\ninputTextField.addEventListener('change',function(){\r\n\talert('change')\r\n});\r\ninputTextField.addEventListener('return',function(){\r\n\talert('return')\r\n});\r\nwin.add(inputTextField);\r\nwin.open();\r\n{code}\r\n3. It's running nice on iOS, but it's failing on mobile web. ", "attachment": [], "flagged": false, "summary": "IOS: Events are not working in iOS", "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": "Titanium SDK version: 2.1.0.v20120606105255.9f0f0ba\r\nPlatform & version: Mobile Web, Chrome, Mac OSX \r\nDevice Details: Mobile Web, Chrome, Mac OSX \r\nHost Operating System: OSX 10.7.3 \r\nTitanium Studio version: 2.0.2", "comment": { "comments": [ { "id": "198610", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Behavior is correct. The alert window causes the text field to blur, which fires the blur event. When you click OK and the alert window disappears, it causes the text field to focus, which creates an alert, rinse and repeat. iOS doesn't exhibit this behavior because there is a bug that prevents alert dialogs from focusing/blurring windows.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T16:36:11.000+0000", "updated": "2012-06-14T16:36:11.000+0000" }, { "id": "198622", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Why doesn't IOS fire blur on text field when the alert comes up?", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T17:19:56.000+0000", "updated": "2012-06-14T17:19:56.000+0000" }, { "id": "198627", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After some discussion with Blain, I learned that iOS doesn't quite use the same focus/blur model as Mobile Web. In iOS, something is focused when it becomes visible, but in Mobile Web (and maybe Android?), something becomes focused when it becomes the \"focused\" element (think tabbing through a web page). In iOS, since an alert doesn't obscure the entire window, it doesn't fit the focus/blur model and thus nothing happens. This could be something to consider for parity purposes, but it doesn't seem to be a bug in the classic sense.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T17:33:54.000+0000", "updated": "2012-06-14T17:33:54.000+0000" }, { "id": "411034", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T23:30:02.000+0000", "updated": "2017-03-09T23:30:02.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }