This is a regression since 3.4.1 works fine.
Focus event is firing continuously (infinite times) for Ti.UI.Window.
Steps To Reproduce
1. Create a classic app using following code
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title: 'Window 1',
backgroundColor: '#fff'
});
win.addEventListener('focus',function(e){
alert('test win');
});
win.open();
2. Run the app in iOS device
Actual Result
Focus event is firing continuously ( infinite times)
Expected Result
Focus event should fire only once when it's focused.
[~bhatfield] expected behavior now, need to be in release notes.
This is now expected behavior. On iOS8 AlertDialogs and OptionDialogs are full fledged view controllers. So when they show up, the top most Window proxy will blur. It will regain focus when these dialogs are dismissed. So you have an infinite loop. Try this code to see discrepancy in behavior on iOS7 and iOS8.
Closing ticket as the issue will not fix.