Bug? Android - window.close event couldn't be caught in other windows
Is this a bug?
I create a window, register a close-event listener and show the window. At iPhone the event gets cought (after closing the new window) and the message get's displayed. At Android there is nothing but silence…
var addNoteWindow = Titanium.UI.createWindow({
url : 'addNoteWindow.js'
});
addNoteWindow.addEventListener('close', function(e) {
Ti.API.info('addNoteWindow closed');
});
Titanium.UI.currentTab.open(addNoteWindow,{animated:true});
3 Answers
-
Hi,
Any updates on this? I am experiencing this problem too!
Thanks,
Marc
-
Hmm.. in our test we add a close event listener inside the window context (i.e. inside
addNoteWindow.js
), can you try that to see if it works as a temporary workaround?In the meantime, I've opened a bug here:
https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/756-external-event-listeners-for-window-close-event-arent-executed -
I've tested that - it works, but it won't help me. I need to know of the closing window in the context where it got created.