if (typeof cw.default_focus == 'function') {
cw.default_focus();
}
+ // an alternative to the practice above
+ var evt = cw.document.createEvent("Events");
+ evt.initEvent( 'tab_focus', true, true );
+ cw.window.dispatchEvent(evt);
}
} catch(E) {
obj.error.sdump('D_ERROR','init_tab_focus_handler: ' + js2JSON(E));
if (typeof cw.default_focus == 'function') {
cw.default_focus();
}
+ // an alternative to the practice above
+ var evt = cw.document.createEvent("Events");
+ evt.initEvent( 'tab_focus', true, true );
+ cw.window.dispatchEvent(evt);
} catch(E) {
obj.error.sdump('D_ERROR', 'main.menu, set_tab, onload: ' + E);
}
} else {
dump(location.href + ': browser.js, updateNavButtons, xulG = ' + xulG + ' xulG.set_help_context = ' + xulG.set_help_context + '\n');
}
+ try {
+ var cw = obj.get_content();
+ if (typeof cw.default_focus == 'function') {
+ cw.default_focus();
+ }
+ var evt = cw.document.createEvent("Events");
+ evt.initEvent( 'tab_focus', true, true );
+ cw.dispatchEvent(evt);
+ } catch(E) {
+ dump('Error in browser.js, calling cw.default_focus and cw.dispatchEvent: ' + E);
+ }
},
'buildProgressListener' : function() {