[TIMOB-23701] iOS: close() is applied to multiple window views with Storyboard enabled
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-01T00:51:17.000+0000 |
Affected Version/s | Release 5.4.0 |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | qe-5.4.0, regression |
Reporter | Harry Bryant |
Assignee | Hans Knöchel |
Created | 2016-07-28T21:30:00.000+0000 |
Updated | 2016-08-01T17:58:36.000+0000 |
Description
*This is a regression from 5.3.1.GA*
It was found that when opening a second window within an app, calling the
close()
method will actually close both windows. *This only occurs when <enable-launch-screen-storyboard>
is set to TRUE, which is the default configuration.*
TEST CODE:
Ti.UI.backgroundColor = "Black";
var win = Ti.UI.createWindow({backgroundColor:'blue'});
var open = Ti.UI.createButton({
title: 'Open Window'
});
var close = Ti.UI.createButton({
title: 'Close Window'
});
open.addEventListener('click', function(){
var win2 = Ti.UI.createWindow({backgroundColor:'green'});
win2.add(close);
close.addEventListener('click', function(){
win2.close();
});
win2.open();
});
win.add(open);
win.open();
Background: *Black*
{color:#205081}Window 1: *Blue*{color}
{color:#14892c}Window 2: *Green*{color}
Steps to Reproduce
1. Create a new Classic Mobile Project. 2. Copy above test code into app.js file. 3. Ensure that<enable-launch-screen-storyboard>
is set to TRUE in the tiapp.xml.
4. Run App to device / sim.
5. Click on "Open Window" button, this will open a second green window.
6. Click on "Close Window" button, this will close the second green window.
From Harry: 5.4.0.v20160720201924 was unaffected, So the causing factor would most likely be made somewhere between 20-25th
Most probably caused by https://github.com/appcelerator/titanium_mobile/pull/8152, will check right now.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/8169 PR (5_4_X): https://github.com/appcelerator/titanium_mobile/pull/8170
CR and FT passed. PRs merged.
Verified as fixed, with the latest build this issue is no longer reproducible. However I've found that when opening and closing the window a couple of times, I receive the following DEBUG log:
Additionally, the log count is incremented every time I cycle through Open / Close. For example after 5 cycles I receive the following:
( 1 + 2 + 3 + 4 + 5 ) *Closing this ticket as fixed.* A separate ticket has been created in regards to the discovered issue. ( TIMOB-23711 ) Tested On: iPhone 6S (9.3.3) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160801022303 Appc Studio: 4.7.0.201607111053 Appc NPM: 4.2.7 App CLI: 5.4.0-37 Xcode 7.3 Node v4.4.7
[~htbryant] That is very important to know. Did that not happen prior to 5.4.0? And using what test-case?
[~hansknoechel] This issue doesn't occur with 5.3.1.GA. I've included the test case and reproducible steps in the created ticket: TIMOB-23711 . Additionally, checked to see if Storyboard set to
true
was causing the issue, but it occurs even when set to false.