Use window.top.location instead of window.location

(closes #3950)
This commit is contained in:
Bryan Housel
2017-04-21 01:29:22 -04:00
parent 26ae84f8e5
commit bcd4e5135a

View File

@@ -99,7 +99,14 @@ export function utilDetect(force) {
}
setTextDirection(detected.textDirection);
detected.host = window.location && (window.location.origin + window.location.pathname);
// detect host
var loc = window.top.location;
var origin = loc.origin;
if (!origin) { // for unpatched IE11
origin = loc.protocol + '//' + loc.hostname + (loc.port ? ':' + loc.port: '');
}
detected.host = origin + loc.pathname;
detected.filedrop = (window.FileReader && 'ondrop' in window);