Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Low
-
Resolution: Duplicate
-
Affects Version/s: Release 3.2.0
-
Fix Version/s: None
-
Component/s: iOS
-
Environment:
Titanium Command-Line Interface, CLI version 3.2.0, Titanium SDK version 3.2.0.GA
iOS SDK: 7.0.3
iPhone Simulator: 7.0.3
Description
I'm using NavigationWindow to create windows(screens) flow in our App. Also I have side-menu there (another window below NavigationWindow) which I show on "Menu" button click by animating NavigationWindow to the right (see attached screenshot). I found, what if I animate NavigationWindow with "animate" method – windows inside NavigationWindow loses focus and no longer receive "focus" and "blur" events (maybe some other events too, dunno). Even newly created windows not receive those events too. I have some vital functional (as timers creation and other stuff) linked to those events, so I need them in working condition.
Before I used NavigationGroup and all was fine with it, but now it's deprecated.
Code to reproduce:
var win1 = Ti.UI.createWindow({
|
backgroundColor: 'white'
|
});
|
|
win1.addEventListener('click', function(){
|
navWindow.openWindow(win2);
|
});
|
|
win1.addEventListener('focus', function(){
|
Ti.API.info((new Date()) + ' win1:focus');
|
});
|
|
win1.addEventListener('blur', function(){
|
Ti.API.info((new Date()) + ' win1:blur');
|
});
|
|
var win2 = Ti.UI.createWindow({
|
backgroundColor: 'red'
|
});
|
|
win2.addEventListener('click', function(){
|
navWindow.closeWindow(win2);
|
});
|
|
var navWindow = Ti.UI.iOS.createNavigationWindow({
|
backgroundColor:'#ffffff',
|
backgroundImage: 'Default.png',
|
window: win1,
|
});
|
|
navWindow.open();
|
|
// Setup deferred animation of navWindow (for simplify things)
|
setTimeout(function(){
|
Ti.API.info((new Date()) + ' animated');
|
navWindow.animate({
|
duration: 1000, // here I just show what any animation breaks the things
|
});
|
}, 10000);
|
You can click on window to open another one and see messages in the console when you go back to first window again. Code contains auto-triggered function which "animates" navWindow after 10 seconds from app launch. After that you can no longer see focus and blur messages in the console on the same interactions with windows, but see only one last "win1:blur" (btw, when NavigationGroup was used looks like no "blur" event was fired).
[INFO] : Tue Dec 24 2013 17:47:20 GMT+0400 (MSK) win1:focus
|
[INFO] : Tue Dec 24 2013 17:47:22 GMT+0400 (MSK) win1:blur
|
[INFO] : Tue Dec 24 2013 17:47:24 GMT+0400 (MSK) win1:focus
|
[INFO] : Tue Dec 24 2013 17:47:24 GMT+0400 (MSK) win1:blur
|
[INFO] : Tue Dec 24 2013 17:47:26 GMT+0400 (MSK) win1:focus
|
[INFO] : Tue Dec 24 2013 17:47:30 GMT+0400 (MSK) animated
|
[INFO] : Tue Dec 24 2013 17:47:30 GMT+0400 (MSK) win1:blur
|
Expected result:
- some code animates NavigationWindow with NavigationWindow.animate method
- windows inside NavigationWindow remains ability to receive "focus" and "blur" events
Actual result:
- some code animates NavigationWindow with NavigationWindow.animate method
- windows inside NavigationWindow loses ability to receive "focus" and "blur" events anymore
Attachments
Issue Links
- duplicates
-
TIMOB-16560 iOS: Window focus/blur events do not fire after animating the navigation window
-
- Closed
-
- relates to
-
TIMOB-15768 Window focus event not firing after animating containing TabGroup
-
- Closed
-