Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3215] Issue with ScrollView/TableView & TextField in it

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-06-11T17:08:21.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.1.0, Sprint 2012-12 API
ComponentsiOS
Labelsapi, qe-port
ReporterRomain Salles
AssigneeSabil Rahim
Created2011-04-15T03:39:41.000+0000
Updated2012-12-03T15:41:08.000+0000

Description

Hi,

I have an issue when I associate a tableview with a textfield.

As you can see in the file called bug_01.png, I have a view with a TableView and then a button.

In my table view, I have a TextField (the one with the value 122). When I click on it to edit it, then the keyboard appears and a gap is created between my TableView and my button (see bug_02.png). Meanwhile, the same space is removed from the top of my view (see the yellow arrays).

Any idea why?

PS: my window is constructed like this:

window
   scrollView
     tableView
       section
         row (with view)
       section (with an headerView)
         row
         row
         row (with the textField)
     button

Attachments

FileDateSize
bug_01.png2011-04-15T03:39:41.000+000034912
bug_02.png2011-04-15T03:39:41.000+000047928

Comments

  1. Tyler Mulligan 2012-01-12

    I believe this is a similar bug related to textfields/softkeyboard inside the scrollView: http://developer.appcelerator.com/question/129653/the-size-of-scrollview-content-changes-after-hiding-the-soft-keyboard
  2. Brice Lechatellier 2012-01-20

    Still an issue on 1.9.0.x, textArea are behaving normally though.
  3. Athanasios Nikolaou 2012-04-04

    Is there any progress in this issue?
  4. Clifton Labrum 2012-04-20

    I'm seeing this same issue. I'd love to see a fix.
  5. Matt Donders 2012-05-01

    Any updates to this? Still an issue on 2.0.1.x - view is expanding in size greatly.
  6. Ricardo Canastro 2012-06-03

    After 6 months still no updates? This issue should get more attention... It really messes with user experience.
  7. Vishal Duggal 2012-06-06

    Some test code
       
       var win = Ti.UI.createWindow({
       	backgroundColor:'white'
       })
       
       var sv = Ti.UI.createScrollView({
       	contentHeight:'auto',
       	layout:'vertical'
       })
       
       var data = [];
       
       for (var i = 0; i < 2; i++) 
       {
           data[i] = Ti.UI.createTableViewSection({
               headerTitle: 'Section ' + i
           });
           var maxRows = i*2 + 1;
           for (var j=0;j<maxRows;j++)
           {
           	var row = Ti.UI.createTableViewRow({
                   className: 'row',
                   sectionIndex: i,
                   rowIndex: j
               });
               
               var container = Ti.UI.createView({
                   layout: 'vertical',
                   height: Ti.UI.SIZE,
                   top: 10,
                   left: 10,
                   bottom: 10,
                   right: 10
               });
               
               container.add(Ti.UI.createLabel({
                   left: 0,
                   text: 'Label ' + j,
                   font: {
                       fontWeight: 'bold',
                       fontSize: 16
                   }
               }));
                
               container.add(Ti.UI.createLabel({
                   top: 5,
                   left: 0,
                   text: 'Sub Label ' + j,
                   font: {
                       fontStyle: 'italic',
                       fontSize: 14
                   }
               }));
               
               container.add(Ti.UI.createTextField({
               	top:5,
               	bottom:5,
               	width:150,
               	height:40,
               	borderStyle:Ti.UI.INPUT_BORDERSTYLE_LINE
               }));
               row.add(container);
               
               data[i].add(row);
           }
       }
       
       var tv = Ti.UI.createTableView({
       	data:data,
       	height:500
       })
       
       sv.add(tv);
       
       var btn = Ti.UI.createButton({
       	title:'Random Button',
       	top:5,
       	bottom:5,
       	width:130,
       	heigh:40
       })
       
       sv.add(btn);
       
       win.add(sv);
       
       win.open();
       
       
  8. Anshu Mittal 2012-08-28

    Verified on: SDK:2.2.0.v20120827143312 Studio:2.1.2.201208201549 Devices: iOS simulator, iPhone 3GS
  9. Martin Weissbach 2012-10-01

    According to the Fix Version of this issue it should work in the latest RC of SDK 2.1.3 yet it does not for me. The comment of [~amittal] the solution was verified on SDK 2.2.0. Is the verification version correct or the one displayed in the Fix Version of this issue?
  10. Ygor Lemos 2012-12-03

JSON Source