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:
@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user