Skip to content

Commit

Permalink
Fix IE Loading issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoltan Hawryluk committed May 17, 2012
1 parent 94eb06f commit b982e2d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions shared/js/html5Forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,17 +478,9 @@ var EventHelpers = new function(){

var func = eval(funcName);

// if document is already loaded, then just execute.
if (/loaded|complete|interactive/.test(document.readyState)) {
mylog('execute immediately')
func();
return;
}


// for Internet Explorer < 9 (using conditional comments)
/*@cc_on @*/
/*@if (@_win32 && @_jscript_version == 10)
/*@if (@_win32 && @_jscript_version < 10)
if (timerForIE) {
isIEPolling = true;
} else {
Expand All @@ -497,6 +489,16 @@ var EventHelpers = new function(){
}
/*@end @*/

// if document is already loaded, then just execute.
if (!isIEPolling && /loaded|complete|interactive/.test(document.readyState)) {
mylog('execute immediately')
func();
return;
}




if ((isSafari && safariVer < 3.1) || isIEPolling) { // sniff
mylog('polling')
pageLoadEventArray.push(func);
Expand Down

0 comments on commit b982e2d

Please sign in to comment.