Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8425] iOS: Textfield in scrollview does not slide back to original position on blur

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-27T23:54:00.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sRelease 2.1.0, Sprint 2012-08, Release 3.0.0, Sprint 2012-20 API, 2012 Sprint 20
ComponentsiOS
LabelsSupportTeam, api, module_textfield, qe-ios6, qe-testadded
ReporterVarun Joshi
AssigneeIngo Muschenetz
Created2012-03-29T13:53:48.000+0000
Updated2013-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

  1. Vishal Duggal 2012-04-09

    Fixed by PR 1930 against TIMOB-1902
  2. Tamila Smolich 2012-06-27

    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)
  3. Tamila Smolich 2012-09-26

    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)
  4. Ingo Muschenetz 2012-09-27

    Keeping in for 3.0, but will defer for 2.1.3.
  5. Vishal Duggal 2012-09-27

    Test is for iPAD. There is an issue with textFields in scrollView but that is addressed in timob-11023 Resolving this
  6. Olga Romero 2012-10-17

    Closing as fixed: Verified with: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, build: 3.0.0.v20121017102440 Device: iPad3 ios 6.0
  7. Shameer Jan 2013-11-07

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4863

JSON Source