Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8454] iOS: Ti.UI.TableView containing a Ti.UI.TableViewRow containing a Ti.UI.TextField adds blank space at the bottom

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-07-12T02:42:15.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sRelease 2.1.0, Sprint 2012-08
ComponentsiOS
Labelscore, module_tableview, qe-testadded
ReporterJunaid Younus
AssigneeMax Stepanov
Created2012-03-30T13:07:21.000+0000
Updated2012-12-03T19:38:06.000+0000

Description

*Code*
var win = Ti.UI.createWindow({
	fullscreen : false,
	backgroundColor : 'white'
});

var tableView = Ti.UI.createTableView({
	top : '0dp',
	bottom : '0dp',
	left : '0dp',
	right : '0dp'
});

var numRows = 15;
var rows = [];
for (var i = 0; i < numRows; i++){
	var tableViewRow = Ti.UI.createTableViewRow({
		height : 'auto'
	});
	
	var textField = Ti.UI.createTextField({
		top:'0dp',
		left : '5dp',
		right : '5dp',
		borderColor : '#CCCCCC',
		borderStyle : Ti.UI.INPUT_BORDERSTYLE_BEZEL
	});
	
	tableViewRow.add(textField);
	
	rows.push(tableViewRow);
}
tableView.data = rows;
win.add(tableView);
win.open();
*Expected behavior* When tapping on one of the Ti.UI.TextField objects, and then pressing the 'return' key on the keyboard, it should work fine, without any issues. *Actual behavior* When you do the above, once the keyboard slides down, you can scroll down the Ti.UI.TableView, meaning extra, unnecessary entries have been added to the list. This was not possible, before you focused on a Ti.UI.TextField object. *Notes* -Only tested on the iOS simulator. -Will update customer priority, once I get a reply. -HD ticket: http://support-admin.appcelerator.com/display/APP-929387

Comments

  1. Ryan Marr 2012-04-03

    I represent the company that originally reported this issue. You deleted my help desk ticket and I have no other means of contacting you. The issue in question is annoying, ugly and reflects poorly on our organization's ability to provide a quality experience to our customers. I would like this fixed sooner than later please!
  2. Junaid Younus 2012-04-03

    Hi Ryan, Looks like your ticket has been deleted/moved by the system somehow. When do you need this fixed by? What is the latest date you can wait till? We will try and schedule this to be fixed before that given timeframe. Please just comment on this JIRA ticket. Thanks
  3. Ryan Marr 2012-04-03

    Any chance you can have it fixed by Friday 4/6/2012?
  4. Junaid Younus 2012-04-03

    We will try our best to get this sorted as soon as possible, I have made the team aware of this.
  5. Vishal Duggal 2012-04-09

    Fixed by PR 1930 against TIMOB-1902.
  6. Michael Pettiford 2012-06-20

    Closing issue Tested with Ti Studio build 2.1.0.201206200844 Ti Mobile SDK 2.1.0.v20120619172256 hash rd3a84b13 OSX Lion 10.7.3 iPhone 4S OS 5.1 The expected behavior is shown
  7. Shyam Bhadauria 2012-07-12

    Re-opening to edit label
  8. Ygor Lemos 2012-12-03

    I'm still experiencing this bug on 2.1.4.GA When you focus on a textfield, there's a lot of extra space added to the bottom of the tableview... after you close the keyboard the extra space remains and ruins the design.
  9. Ygor Lemos 2012-12-03

    Also, this problem seems to be haunting Titanium since forever: http://developer.appcelerator.com/question/58451/tableview-displacement-bug
  10. Ygor Lemos 2012-12-03

    It seems I can get a temporary fix by calling tableView.setContentInsets({top: 0, bottom: 0, right: 0, left: 0}); on blur for all textFields and textAreas inside the tableView. Still not the best / expected behavior for this.
  11. Max Stepanov 2012-12-03

    Ygor, I tested 2.1.4 and 3.0.0.RC with 5.0/6.0 iPhone versions and was not able to reproduce . Please provide steps and/or sample code.
  12. Ygor Lemos 2012-12-03

    I've made a simple tableview with lots of TextFields inside and it doesn't happen indeed... It seems to only happen on windows with severely customized tableViewRows and other elements added to the window (like pickers) that would show upon specific events... thing is that the pickers don't break the tableview content insets... only the textviews... I'll investigate further so I can come up with a valid testcase since I can't post sensitive code here... Will come with something soon

JSON Source