Skip to content

focus event on NavigationWindow windwos (with examples) #34

@tujoworker

Description

@tujoworker

Hi!

on NavigationWindow you can have a focus/blur listener on opening/closing windows. Nice to have to know if an windows closes "before" the fx is over. There are other reasons as well.

If we add the NavigationWindow into the NappSliderMenu, the focus/blur event listeners don't fire anymore and closing/opening windows. The open/close event listeners works just fin.

Some examples to test:

app.js - NappSliderMenu version
var win = Ti.UI.createWindow({ backgroundColor:'#fff', }); win.addEventListener('focus', function(){ Ti.API.info('focus'); }); win.addEventListener('blur', function(){ Ti.API.info('focus'); }); var navController = Ti.UI.iOS.createNavigationWindow({ window : win, }); var NappSlideMenu = require('dk.napp.slidemenu'); var window = NappSlideMenu.createSlideMenuWindow({ centerWindow: navController, }); window.open();
app.js - default
var win = Ti.UI.createWindow({ backgroundColor:'#fff', }); win.addEventListener('focus', function(){ Ti.API.info('focus'); }); win.addEventListener('blur', function(){ Ti.API.info('focus'); }); var navController = Ti.UI.iOS.createNavigationWindow({ window : win, }); navController.open();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions