Focus fix for gecko based browser dialogs

This commit is contained in:
julmis 2004-03-01 23:59:11 +00:00
parent f77b6706ac
commit e418c553a6

View File

@ -20,7 +20,7 @@ function Dialog(url, action, init) {
Dialog._parentEvent = function(ev) {
if (Dialog._modal && !Dialog._modal.closed) {
Dialog._modal.focus();
setTimeout(function(){Dialog._modal.focus();}, 1);
// we get here in Mozilla only, anyway, so we can safely use
// the DOM version.
ev.preventDefault();
@ -58,7 +58,7 @@ Dialog._geckoOpenModal = function(url, action, init) {
};
capwin(window);
// capture other frames
//for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
// make up a function to be called when the Dialog ends.
Dialog._return = function (val) {
if (val && action) {
@ -66,7 +66,7 @@ Dialog._geckoOpenModal = function(url, action, init) {
}
relwin(window);
// capture other frames
//for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
Dialog._modal = null;
};
};