Window 'close' event fires three times in a row!
Here is the example code:
http://gist.github.com/603078
The event listener fires three times in a row.
And each time event properties are the same.
Tested on Android 2.2 and Ti SDK 1.4 (also 1.4.2 from continuous builds).
3 Answers
-
Have you checked the event type to see what the messages may be?
win.addEventListener('close', function(e) { Ti.API.info('addNoteWindow closed ' + e.type); });
In my quick test on an iPhone I got a type of 'close' you may be seeing others but perhaps you can choose to perform your action on just one of the types. Just a thought.
-
Known issue Ticket 1827 put a watch on the ticket to know when it's fixed.
-
Thanks.