From f1c22d66de8fe4109f903e8e3cfe4190baa36877 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Thu, 22 Oct 2015 20:50:44 +0200 Subject: [PATCH] fix(client): Revert back to old reloading detection Ref #1656 --- client/karma.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/client/karma.js b/client/karma.js index 245fd9994..ac102e0c6 100644 --- a/client/karma.js +++ b/client/karma.js @@ -24,22 +24,14 @@ var Karma = function (socket, iframe, opener, navigator, location) { var childWindow = null var navigateContextTo = function (url) { - reloadingContext = true - if (self.config.useIframe === false) { if (childWindow === null || childWindow.closed === true) { // If this is the first time we are opening the window, or the window is closed childWindow = opener('about:blank') } childWindow.location = url - childWindow.onLoad = function () { - reloadingContext = false - } } else { iframe.src = url - iframe.onLoad = function () { - reloadingContext = false - } } } @@ -113,6 +105,8 @@ var Karma = function (socket, iframe, opener, navigator, location) { this.stringify = stringify var clearContext = function () { + reloadingContext = true + navigateContextTo('about:blank') } @@ -217,6 +211,7 @@ var Karma = function (socket, iframe, opener, navigator, location) { // reset hasError and reload the iframe hasError = false startEmitted = false + reloadingContext = false self.config = cfg navigateContextTo(constant.CONTEXT_URL)