[TIMOB-3274] iPhone 1.6.0 Grouped TableView scrollable: false still displaces
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-10-27T15:22:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-30, Release 1.8.0 |
Components | iOS |
Labels | n/a |
Reporter | Matt |
Assignee | Stephen Tramer |
Created | 2011-04-15T03:41:03.000+0000 |
Updated | 2012-02-10T00:52:10.000+0000 |
Description
Using 1.6.0 on an iPhone
I have a grouped tableview in a modal window.
Under 1.5.1 setting scrollable = false on the tableview would fix
it in position so when focus is made on one of the textfields in
the tableview the tableview wouldn't jump down the page. (See
sceenshot1.png). I've just tried the following code on 1.6.0 as it
seems like scrollable = false isn't working in the same way it was
in 1.5.1 - when focus is made on a textfield the tableview
displaces (See screenshot2.png)
This behaviour occurs in the simulator and on the device.
I've also attached a zip of a Resources directory that shows the problem (you need to click on the register button)
var registerData = [];
var usernameRow = Titanium.UI.createTableViewRow({className:'defaultRow', hasChild:false, selectedBackgroundColor: 'white', selectionStyle: 'NONE', selectedColor:'white'});
var passwordRow = Titanium.UI.createTableViewRow({className:'defaultRow', hasChild:false, selectedBackgroundColor: 'white', selectionStyle: 'NONE', selectedColor:'white'});
var registerUsername = Titanium.UI.createTextField({
keyboardType:Titanium.UI.KEYBOARD_EMAIL,
autocorrect:false,
hintText:'email address',
height:29,
left:10,
width:285,
clearButtonMode:Titanium.UI.INPUT_BUTTONMODE_ONFOCUS,
autocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE
});
var resgisterPassword = Titanium.UI.createTextField({
keyboardType:Titanium.UI.KEYBOARD_DEFAULT,
autocorrect:false,
hintText:'password',
height:29,
left:10,
width:285,
clearButtonMode:Titanium.UI.INPUT_BUTTONMODE_ONFOCUS,
autocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,passwordMask:true
});
usernameRow.add(registerUsername);
passwordRow.add(resgisterPassword);
registerData[0] = Titanium.UI.createTableViewSection();
registerData[0].add(usernameRow);
registerData[0].add(passwordRow);
var registerTable = Titanium.UI.createTableView({
style:Titanium.UI.iPhone.TableViewStyle.GROUPED,
scrollable: false,
data:registerData,
});
Attachments
File | Date | Size |
---|---|---|
resources.zip | 2011-04-15T03:41:04.000+0000 | 2397958 |
screenshot1.png | 2011-04-15T03:41:05.000+0000 | 74337 |
screenshot2.png | 2011-04-15T03:41:05.000+0000 | 76405 |
I'm confirming this behavior, it works as expected on SDK 1.5 There is a http://developer.appcelerator.com/helpdesk/view/76381">Help Desk ticker that encountered the bug.
Even if the tableView has "scrollable: false", on focus of the textfield in a row, it will scroll to the center of the viewing area. Code sample above demonstrates the problem.
Tested on iPhone Simulator 4.2
Titanium SDK 1.6.1 (Mar 9 2011 12:23 r1e15e40a)
Hi Guys just wondering if there's a work around - can't view the help desk ticket mentioned by Pedro above for some reason.
I opened that ticket and there was no workaround given.
Are there any suggestions on this one? (I also can't see the Helpdesk ticket). This breaks our app's ability to use 1.6.x (this is broken in SDK 1.6.1 as well). We had an existing view that didn't even set scrollable=false and it was fine in 1.5.x, but as indicated above, breaks in 1.6, and then scrollable=false does not fix it. I'm curious why this is low priority given it makes using a grouped tableview in a modal window impossible, which seems like a pretty core problem.
More info on this, and at least a workaround that worked for me...
First, it doesn't have to be a modal window (in my case I was seeing this in a regular tab stack window).
Second, it seems that this happens only for small height tables - i.e. a table that doesn't fill more than say about 1/3rd of the height of the window...
Workaround: add a footer view, or make the size of your footer view tall enough to consume most of the remaining window height. This worked out for me and prevented any scrolling, etc.
I can confirm that the workaround of adding a tall footer view works.
Cannot reproduce in master/65a5393. Marking fixed.
Tested On: Mac OSX Lion TiMob: 1.8.0.v20110819142548 TiStud: 1.0.4.201108101535 Devices: iPhone 4 version 4.2.10 iPad2 version 4.3.5 iPod 3