Stop Code before redirecting after submit

Usually, this should not be needed, but users can first submit code and simultaneously request comments.

Fixes CODEOCEAN-KM
This commit is contained in:
Sebastian Serth
2023-03-20 14:02:20 +01:00
parent 118eaa17f4
commit bdcef4d183

View File

@ -205,6 +205,7 @@ CodeOceanEditorSubmissions = {
this.createSubmission(button, null, function (response) { this.createSubmission(button, null, function (response) {
if (response.redirect) { if (response.redirect) {
this.autosaveIfChanged(); this.autosaveIfChanged();
this.stopCode(event);
this.editors = []; this.editors = [];
Turbolinks.clearCache(); Turbolinks.clearCache();
Turbolinks.visit(response.redirect); Turbolinks.visit(response.redirect);