From f1b29a6fd1b99d0767660281179a4ed797b9c05a Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 9 Sep 2015 20:13:35 -0700 Subject: [PATCH] fix modal showing when challenge already completed This fix fixes a regression introduced in an earlier commit. Now, isInitRun is always set false on user involvement. This prevents the completion modal from poping up during challenges that have preview windows. --- client/commonFramework.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/commonFramework.js b/client/commonFramework.js index 2562410c0c..430473a9d2 100644 --- a/client/commonFramework.js +++ b/client/commonFramework.js @@ -244,6 +244,7 @@ editor.setOption('extraKeys', { } }, 'Ctrl-Enter': function() { + isInitRun = false; bonfireExecute(true); return false; } @@ -415,9 +416,6 @@ var testSuccess = function() { if (goodTests === tests.length) { return showCompletion(); } - - // test unsuccessful, make sure initRun is set to false - isInitRun = false; }; function showCompletion() { @@ -762,6 +760,7 @@ function bonfireExecute(shouldTest) { } $('#submitButton').on('click', function() { + isInitRun = false; bonfireExecute(true); });