Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3274] iPhone 1.6.0 Grouped TableView scrollable: false still displaces

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-10-27T15:22:28.000+0000
Affected Version/sn/a
Fix Version/sSprint 2011-30, Release 1.8.0
ComponentsiOS
Labelsn/a
ReporterMatt
AssigneeStephen Tramer
Created2011-04-15T03:41:03.000+0000
Updated2012-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

FileDateSize
resources.zip2011-04-15T03:41:04.000+00002397958
screenshot1.png2011-04-15T03:41:05.000+000074337
screenshot2.png2011-04-15T03:41:05.000+000076405

Comments

  1. Pedro Enrique 2011-04-15

    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)

  2. Matt 2011-04-15

    Hi Guys just wondering if there's a work around - can't view the help desk ticket mentioned by Pedro above for some reason.

  3. Gerry Cardinal III 2011-04-15

    I opened that ticket and there was no workaround given.

  4. chris 2011-04-15

    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.

  5. chris 2011-04-15

    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.

  6. Gerry Cardinal III 2011-04-15

    I can confirm that the workaround of adding a tall footer view works.

  7. Stephen Tramer 2011-07-26

    Cannot reproduce in master/65a5393. Marking fixed.
  8. Vikramjeet Singh 2011-08-29

    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

JSON Source