Land Rich's fix for not using window.top to do frame detection. Fixes #4787.
This commit is contained in:
parent
c4c820efff
commit
bf71575bb4
11
src/event.js
11
src/event.js
|
@ -849,10 +849,15 @@ function bindReady() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// If IE and not an iframe
|
// If IE and not a frame
|
||||||
// continually check to see if the document is ready
|
// continually check to see if the document is ready
|
||||||
// NOTE: DO NOT CHANGE TO ===, FAILS IN IE.
|
var toplevel = false;
|
||||||
if ( document.documentElement.doScroll && window == window.top ) (function() {
|
|
||||||
|
try {
|
||||||
|
toplevel = window.frameElement === undefined;
|
||||||
|
} catch(e){}
|
||||||
|
|
||||||
|
if ( document.documentElement.doScroll && toplevel ) (function() {
|
||||||
if ( jQuery.isReady ) {
|
if ( jQuery.isReady ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue