[TIMOB-26641] iOS: On main thread openWindow and closeWindow in sequence from NavigationWindow is not working properly
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-12-19T12:36:44.000+0000 |
Affected Version/s | Release 7.5.0 |
Fix Version/s | Release 8.0.0 |
Components | iOS |
Labels | run-on-main-thread |
Reporter | Shuo Liang |
Assignee | Vijay Singh |
Created | 2018-12-10T14:44:45.000+0000 |
Updated | 2018-12-19T17:17:13.000+0000 |
Description
Step to reproduce issue:
1. Create a classic mobile app project.
2. Replace app.js code with the provided sample code.
3. Make sure set “run-on-main-thread” property to “true” as default
4. Run on iOS device.
Actual behaviour:
On click of “Open Yellow Window and Close Blue Window” button, “Yellow Window” is getting opened and closed immediately , if we set “run-on-main-thread” property to “true”.
Expected behaviour:
On click of “Open Yellow Window and Close Blue Window” button, it should open “Yellow Window” and close the “Blue Window”.
NOTE:
If we set “run-on-main-thread” property to “false”, then it is working as expected.
Attachments
A quick workaround for this issue is first call closeWindow then call openWindow. Updated app.js which will work-
We will look in this to fix properly.
PR - https://github.com/appcelerator/titanium_mobile/pull/10535 Test Case -
Customer's specific scenario is more complex then example code, where they need to close multiple previously opened windows on open of new window, So provide a new test code in updated_app.js. Hopefully the PR can cover this fix.
[~vijaysingh], With the
updated_app.js
I see that when I clickOpen Yellow Window and Close Blue Window
I see themiddle window
open & then theyellow window
IS this expected ?[~lchoudhary] This PR doesn't completely fix the issue. I am still working on this. Thanks!
[~lchoudhary] PR updated. With the updated_app.js when you click "Open Yellow Window and Close Blue Window", middle window will open & then the yellow window (Reason is first blue window is closed with default animation (true), then yellow window is open with animation true). After you go back, it will show Middle Window. Go back again, it will show Red Window.
FR Passed. Waiting for merge to be enabled.
Verified the fix on SDK 8.0.0.v20181219075358 .