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.
This commit is contained in:
Berkeley Martinez
2015-09-09 20:13:35 -07:00
parent a5f30414ab
commit f1b29a6fd1

View File

@ -244,6 +244,7 @@ editor.setOption('extraKeys', {
} }
}, },
'Ctrl-Enter': function() { 'Ctrl-Enter': function() {
isInitRun = false;
bonfireExecute(true); bonfireExecute(true);
return false; return false;
} }
@ -415,9 +416,6 @@ var testSuccess = function() {
if (goodTests === tests.length) { if (goodTests === tests.length) {
return showCompletion(); return showCompletion();
} }
// test unsuccessful, make sure initRun is set to false
isInitRun = false;
}; };
function showCompletion() { function showCompletion() {
@ -762,6 +760,7 @@ function bonfireExecute(shouldTest) {
} }
$('#submitButton').on('click', function() { $('#submitButton').on('click', function() {
isInitRun = false;
bonfireExecute(true); bonfireExecute(true);
}); });