[TIMOB-3063] Android: Ti.UI.currentWindow not respected on back button click (Android)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-08-30T16:02:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | api |
Reporter | z3nd |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:35:50.000+0000 |
Updated | 2017-03-21T22:32:44.000+0000 |
Description
Hi. I'm using Android APIs 2.2 and Titanium 1.5.1.
I'm trying to implement a menu button which fires an event to the current window (i.e. Window A) on click. This window also contains a button which opens another modal window (i.e. Window B). I can only access Window B from Window A.
When I open Window B (the modal window) first, and then hit the back button to go back to window A, Ti.UI.currentWindow points towards the modal window, Window B instead of Window A. I fired an event from the menu button click, and this event was caught by the modal window instead of the window which I am currently in (after pressing the back-button).
Here is some code to try out:
app.js: http://pastie.org/1535949">http://pastie.org/1535949
winA.js: http://pastie.org/1535954">http://pastie.org/1535954
winB.js: http://pastie.org/1535956">http://pastie.org/1535956
Hi, I'm using android APIs 2.2 and Titanium 1.6.
I noticed similar problems.
The Ti.UI.currentWindow, Ti.UI.currentTab and Ti.UI.currentTabGroup are not updated when using the back key on my HTC desire.
Best regards,
Mario
Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120830102513, unable to reproduce the issue. The app seems to fire the correct event (window A). Ticket marked as resolved.
Closing ticket as the issue cannot be reproduced and due to the above comments.