{ "id": "115694", "key": "TIMOB-14159", "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": "15498", "description": "2013 Sprint 12 API", "name": "2013 Sprint 12 API", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15110", "description": "2013 Sprint 12", "name": "2013 Sprint 12", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-17T22:35:04.000+0000", "created": "2013-06-07T22:46:58.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "triage" ], "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": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:33.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": "*Problem description*\r\nThere is a crash when closing a modal window after inputting text into a TextField inside a ScrollView on iPad only. There is no crash on iPhone.\r\n\r\n*Steps to reproduce*\r\n1. Run the test case on iPad simulator\r\n2. Click Login\r\n3. Input any amount of characters into the TextField\r\n4. Click close on the modal view\r\n5. Wait and observe resulting crash\r\n\r\n*Workaround*\r\nChange the ScrollView to a regular view (see comments).\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar _resetPasswordControls = {};\r\nvar _password = null;\r\n\r\nfunction resetPasswordShow() {\r\n\tif (_resetPasswordControls.baseControl == null || _resetPasswordControls.baseControl == undefined) {\r\n\t\tcreateResetPasswordWindow();\r\n\t}\r\n\r\n\tvar options = {\r\n\t\tmodal : true,\r\n\t\tmodalStyle : Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET\r\n\t};\r\n\t_resetPasswordControls.baseControl.open(options);\r\n};\r\n\r\nfunction resetPasswordClose() {\r\n\t_resetPasswordControls.baseControl.passwordSection = null;\r\n\t_resetPasswordControls.baseControl.resetPasswordStatusSection = null;\r\n\t_password = null;\r\n\r\n\tif (_resetPasswordControls.baseControl != null) {\r\n\t\t_resetPasswordControls.baseControl.close();\r\n\t\t_resetPasswordControls.baseControl = null;\r\n\t}\r\n};\r\n\r\nfunction createResetPasswordWindow() {\r\n\tvar cancelButton = Ti.UI.createButton({\r\n\t\tsystemButton : Ti.UI.iPhone.SystemButton.CANCEL\r\n\t});\r\n\t_resetPasswordControls.baseControl = Ti.UI.createWindow({\r\n\t\ttitle : \"Reset Password\",\r\n\t\tbackgroundColor : \"#FFF\",\r\n\t\tnavBarHidden : false,\r\n\t\tmodal : true,\r\n\t\tleftNavButton : cancelButton,\r\n\t\tlayout : \"vertical\",\r\n\t\torientationModes : [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT]\r\n\t});\r\n\r\n\t// Allow the window to be closed and destroy all memory associated with it.\r\n\tcancelButton.addEventListener('click', resetPasswordClose);\r\n\r\n\t// CRASH: The scroll view is causing the crash.\r\n\t// Change to a regular view to fix crash.\r\n\t// Only occurs on iPad.\r\n\t_resetPasswordControls.baseControl.passwordSection = Ti.UI.createScrollView({\r\n\t\tbackgroundColor : \"#FFF\",\r\n\t\ttop : 10,\r\n\t\theight : 240\r\n\t});\r\n\r\n\t_resetPasswordControls.baseControl.passwordLabel = Ti.UI.createLabel({\r\n\t\ttext : \"New Password\",\r\n\t\ttop : 6,\r\n\t\tleft : \"5%\",\r\n\t\theight : 25,\r\n\t\ttextAlign : \"left\",\r\n\t\tfont : {\r\n\t\t\tfontFamily : 'Helvetica Neue',\r\n\t\t\tfontWeight : 'normal',\r\n\t\t\tfontSize : 17\r\n\t\t}\r\n\t});\r\n\r\n\t_password = Ti.UI.createTextField({\r\n\t\ttop : _resetPasswordControls.baseControl.passwordLabel.top + _resetPasswordControls.baseControl.passwordLabel.height + 2,\r\n\t\tleft : \"5%\",\r\n\t\twidth : \"90%\",\r\n\t\theight : 40,\r\n\t\tpasswordMask : true,\r\n\t\tkeyboardType : Ti.UI.KEYBOARD_DEFAULT,\r\n\t\treturnKeyType : Ti.UI.RETURNKEY_DEFAULT,\r\n\t\tborderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n\t\tautocorrect : false,\r\n\t\tfont : {\r\n\t\t\tfontFamily : 'Helvetica Neue',\r\n\t\t\tfontWeight : 'bold',\r\n\t\t\tfontSize : 20\r\n\t\t}\r\n\t});\r\n\r\n\t_resetPasswordControls.baseControl.passwordSection.add(_resetPasswordControls.baseControl.passwordLabel);\r\n\t_resetPasswordControls.baseControl.passwordSection.add(_password);\r\n\r\n\t_resetPasswordControls.baseControl.add(_resetPasswordControls.baseControl.passwordSection);\r\n};\r\n\r\nvar loginWindow = Ti.UI.createWindow({\r\n\torientationModes : [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT]\r\n});\r\n\r\nvar loginButton = Ti.UI.createButton({\r\n\ttitle : \"Login\",\r\n\twidth : 169,\r\n\theight : 35\r\n});\r\n\r\nloginButton.addEventListener('click', resetPasswordShow);\r\n\r\nloginWindow.add(loginButton);\r\n\r\nloginWindow.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Crash when closing modal window after inputting text into a TextField inside a ScrollView (iPad only)", "creator": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 3.1 GA, 3.2 CI\r\niPad simulator", "comment": { "comments": [ { "id": "258276", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "MASTER PR : https://github.com/appcelerator/titanium_mobile/pull/4396", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-17T21:34:23.000+0000", "updated": "2013-06-17T21:34:23.000+0000" }, { "id": "276331", "author": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified Fix with:\r\nOSX: 10.8.5\r\nXcode:5.0\r\nAppcelerator Studio: 3.2.0.201310230601\r\nSDK:3.2.0.v20131022171645\r\nacs:1.0.7\r\nalloy:1.2.2\r\nnpm:1.3.2\r\ntitanium:3.2.0\r\ntitanium-code-processo:1.0.3\r\nDevice: ipad 7.0", "updateAuthor": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-10-23T10:59:28.000+0000", "updated": "2013-10-23T10:59:28.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }