[TIMOB-8425] iOS: Textfield in scrollview does not slide back to original position on blur
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-27T23:54:00.000+0000 |
Affected Version/s | Release 1.8.2 |
Fix Version/s | Release 2.1.0, Sprint 2012-08, Release 3.0.0, Sprint 2012-20 API, 2012 Sprint 20 |
Components | iOS |
Labels | SupportTeam, api, module_textfield, qe-ios6, qe-testadded |
Reporter | Varun Joshi |
Assignee | Ingo Muschenetz |
Created | 2012-03-29T13:53:48.000+0000 |
Updated | 2013-11-07T05:32:20.000+0000 |
Description
Code
Test this code in landscape orientation
{noformat}
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var formboxLeft = Ti.UI.createView({
backgroundImage:'bg-white-box--with-shadow.png',
left: 20,
top: 265,
width: 460,
height: 420,
});
var field = Ti.UI.createTextField({
hintText: 'password',
color:'#666',
width:'94%',
left: '3%',
top: 140,
width: '50%',
height: 45,
borderRadius:0,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_BEZEL,
passwordMask: true
});
var scroll = Ti.UI.createScrollView({
left: 11,
top: 12,
width: 433,
height: 390,
contentHeight:'auto',
contentWidth: 'auto',
});
scroll.add(field);
formboxLeft.add(scroll);
win.add(formboxLeft);
win.open();
{noformat}
Expected Behavior
Clicking on the textfield should bring up the keyboard and on textfield blur (keyboard down), the textfield should scroll back to original position
Actual Behavior
Textfield does not scroll back to original position and there is a gap that can be seen between the textfield and the border of the scrollview.
Comments
JSON Source
Fixed by PR 1930 against TIMOB-1902
Closing as fixed. Tested and verified with: Titanium Studio, build: 2.1.0.201206251749 Titanium SDK: 2.1.0.v20120626204252 Device: iPad 3rd gen (5.1.1)
Reopening bug for iOS 6.0 and adding a label "qe-ios6". Textfield does not slide back to original position on blur on devices with iOS 6.0. Tested on iPhone 5 (6.0), iPhone 4S (6.0) and noticed slightly different behavior: - on iPhone 5 when soft keyboard pops up the textfield appears above and doesn't slide back after soft keyboard dismissed; - on iPhone 4S we can't see the textfield when soft keyboard pops up, and after dismissing the soft keyboard the text field visually changed its position. No need to run the code in landscape mode, as was written in description. Tested on: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 2.1.2.201208301612 Titanium SDK, build: 2.1.3.v20120926141610 Devices: iPhone 4S (6.0), iPhone 5 (6.0), iPhone 4S (4.3.5)
Keeping in for 3.0, but will defer for 2.1.3.
Test is for iPAD. There is an issue with textFields in scrollView but that is addressed in timob-11023 Resolving this
Closing as fixed: Verified with: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, build: 3.0.0.v20121017102440 Device: iPad3 ios 6.0
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4863