I have set scrollable to false but my tableview is suddenly moving in 1.6.0 when I focus on the textfields. It contains 2 rows with each a textfield.
It worked fine in 1.5.1.
Any ideas?
var emailField = Titanium.UI.createTextField( { value: Model.getEmail(), font: {fontSize: 17, fontWeight: 'bold' }, left: 10, width: 270, color: '#385487', keyboardType: Titanium.UI.KEYBOARD_EMAIL, returnKeyType:Titanium.UI.RETURNKEY_DONE, clearButtonMode: Titanium.UI.INPUT_BUTTONMODE_ONFOCUS, autocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE, backgroundColor:'#FFF', hintText: 'Email' } ); var row1 = Titanium.UI.createTableViewRow( { className: 'emailRow', title: '', selectionStyle: Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE } ); row1.add( emailField );...
var tableView = Titanium.UI.createTableView( { data: [loginSection], style: Titanium.UI.iPhone.TableViewStyle.GROUPED, top:0, scrollable: false, backgroundImage: 'images/Stripe.png' , headerView: headerView, height: 220, moving: false }); win.add( tableView );
4 Answers
Accepted Answer
This is also happening in my project. Small tableView with a few rows, some with textFields. Put focus in the first row/field and the tableView scrolls needlessly to put the field directly above the keyboard. Tap on another field and the tableView scrolls an inch or two. The scroll position will bounce between these two positions each time focus is moved from one textField to the next.
This is on build 1.6.0 with scrollable set to false. The workaround? Size the table to the perfect height for your row count, leaving it no room to scroll.
I'm having this exact same problem.
Very annoying on a 140pixel height tableView with two rows - used for a username and password login.
Despite adding scrollable:false to the tableView constructor, the row/field still moves when the fields are selected and the keyboard comes in to view, causing the row to get 'chopped off'. Due to the position of the tableView and its size, there is no requirement at all to move the rows when the textfield gets focus and the keyboard comes up.
This works fine on the simulator, but not on the device.
I'm trying to recreate this to submit to HelpDesk/lighthouse:
Is your tableView with textFields in a modal window? This seems to be where it happens for me in my tests. (I thought is might be the hidden tabBar causing it, but that didn't cause this issue. Having the test in a modal window did.)
It seems to be scrolling to compensate for the (lack of) tabBar.
- delete - browser refreshed caused duplicate post.
Your Answer
Think you can help? Login to answer this question!