Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25928] iOS: Closing a window with "tabBarHidden" property while modal window is open hides TabGroup bar

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionNot Our Bug
Resolution Date2018-04-04T15:06:37.000+0000
Affected Version/sRelease 6.0.4, Release 6.3.0, Release 7.1.0
Fix Version/sn/a
ComponentsiOS, TiAPI
Labelsapplebug, ios, modal, native_issue, tabgroup
ReporterRene Pot
AssigneeHans Knöchel
Created2018-04-04T09:38:16.000+0000
Updated2018-08-06T17:52:07.000+0000

Description

In a certain flow it is possible to permanently hide the tabbar even though it is not according to spec. It can be recreated using the following flow: - open window with tabbarhidden property on true in tab - open modal window on top of this - close window with tabbarhidden property - close modal window Now, while the tabbar should be visible again, the tabbar is actually hidden. Only way to re-enable it is to open another window in the tabgroup with the tabbarhidden property and then manually close it again without the modal present. This seems to trigger a refresh. Below code to reproduce
Ti.UI.backgroundColor = 'white';

var tabGroup = Ti.UI.createTabGroup();
var window1 = Ti.UI.createWindow({
    title: 'Window 1'
});
var tab1 = Ti.UI.createTab({
    title: 'Tab 1',
    window: window1
});

var window2 = Ti.UI.createWindow({
    title: 'Window 2'
});
var tab2 = Ti.UI.createTab({
    title: 'Tab 2',
    window: window2
});

tabGroup.addTab(tab1);
tabGroup.addTab(tab2);

tabGroup.addEventListener('open', doStuff);

tabGroup.open();

// below is test code to reproduce the issue
function doStuff() {
    Ti.API.info('START!');
    var secondWindow = Ti.UI.createWindow({
        tabBarHidden: true,
        title: "2nd window no tabbar"
    });

    var modalWindow = Ti.UI.createWindow();
    var nav = Ti.UI.iOS.createNavigationWindow({
        window: modalWindow
    });

    setTimeout(function() {
        // open tabbarhidden window in tabgroup
        tab1.openWindow(secondWindow);

        setTimeout(function() {
            // open modal
            nav.open({
                modal: true
            });

            setTimeout(function() {
                // close tabbarhidden window in tabgroup while modal is open
                secondWindow.close();

                setTimeout(function() {
                    // close modal window, now tabbar is gone
                    nav.close();
                }, 1000);
            }, 1000);
        }, 1000);
    }, 2500);
}

Comments

  1. Hans Knöchel 2018-04-04

    This sounds pretty much what http://www.openradar.me/16095272 describes. It seems to be a general iOS issue for native apps and other frameworks as well. As a workaround, you could create a window manually, position it below the screen, open it (which will open it fullscreen) and animate it up to simulate the modal flow. A hacky solution, but unfortunately limited by iOS as of today. *EDIT*: This could likely be done via a CommonJS module as well, having less animate flows in the current app controller directly.
  2. Rene Pot 2018-04-04

    [~hknoechel] this is exactly the workaround that was implemented to get around the issue... kinda shitty apple hasn't fixed it yet. Is there any way issues like this can be put higher on their radar?
  3. Hans Knöchel 2018-04-04

    We could duplicate the issue, but it is still dependent on the number of people requesting it (and 50+ are nothing there). Also, if they fix it in lets say iOS 12.1, only iOS 12.1+ users would get the fix, making it impossible to use across a current project right now. Although the time would play for you there.
  4. Eric Merriman 2018-08-06

    Closing as "not our bug". If you disagree, please reopen.

JSON Source