Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8754] iOS: Popover reorientation with Keyboard breaks layout

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-02T11:22:22.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelscore, look1
ReporterDawson Toth
AssigneeShameer Jan
Created2012-04-17T10:18:25.000+0000
Updated2017-03-31T20:38:40.000+0000

Description

Problem

Reorienting a popover when a text field in it is focused results in the popover's layout distorting.

Evidence

See this bug in action in the 4 attached images, or in this YouTube video: http://www.youtube.com/watch?v=jVK8QjIlb8g

Reproduction

1. Use the following app.js. 2. Press "Show Popover" 3. Reorient several times. The popover properly hides and shows, displaying its content as it was specified in the JS. 4. Focus the search bar to bring up the keyboard. If you're in landscape, the popover will properly reduce its height to make room for the keyboard. 5. Reorient. If you're now in portrait, the popover's height will increase to its old value, but the content won't change its height. Or, if you're not in landscape, the table view will take up the entire height, and the search bar won't be visible at all.
var win = Ti.UI.createWindow();

var button = Ti.UI.createButton({
    title: 'Show Popover',
    height: 50, width: 300,
    top: 100
});
win.add(button);

button.addEventListener('click', function () {
    var popover = Ti.UI.iPad.createPopover({
        width: 200,
        height: 350,
        title: 'Table View',
        barColor: '#111'
    });

    popover.add(Ti.UI.createSearchBar({
        top: 0,
        height: 44
    }));
    popover.add(Ti.UI.createTableView({
        data: [
            { title: 'Option 1' },
            { title: 'Option 3' },
            { title: 'Option 2' }
        ],
        top: 44,
        bottom: 0
    }));

    popover.show({
        view: button,
        animated: true
    });
});

win.open();

Attachments

FileDateSize
iOS Simulator Screen shot Apr 2, 2013 11.23.29 AM.png2013-04-02T11:23:16.000+000099736
step1.showPopover.jpg2012-04-17T10:27:19.000+000032794
step2.focusText.jpg2012-04-17T10:27:19.000+000083150
step3.reorient.jpg2012-04-17T10:27:19.000+000065177
step4.reorientAgain.jpg2012-04-17T10:27:19.000+000079060

Comments

  1. Shameer Jan 2013-04-02

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPad Simulator: iOS SDK version: 5.1
  2. Lee Morris 2017-03-31

    Closing ticket as this was last updated in 2013, please open a new ticket if this problem persists.

JSON Source