mirror of
https://github.com/moodle/moodle.git
synced 2025-01-23 16:48:36 +01:00
Focus fix for gecko based browser dialogs
This commit is contained in:
parent
f77b6706ac
commit
e418c553a6
@ -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;
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user