From 1631474e7484a89523eabdbc5eb98e431c286c2e Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Thu, 22 Oct 2015 18:16:04 +0200 Subject: [PATCH] fix(client): Wait for iframe to be loaded We need to wait for the iframe to be loaded before we can set reloadingContext to false. Closes #1652 --- client/karma.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/karma.js b/client/karma.js index d513623eb..9e5f909d0 100644 --- a/client/karma.js +++ b/client/karma.js @@ -25,16 +25,20 @@ 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 + reloadingContext = false } else { iframe.src = url + iframe.onLoad = function () { + reloadingContext = false + } } - reloadingContext = false } this.setupContext = function (contextWindow) {