From bdcef4d183e3e9e493c4e27af35d88c6d1b9879d Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Mon, 20 Mar 2023 14:02:20 +0100 Subject: [PATCH] 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 --- app/assets/javascripts/editor/submissions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/editor/submissions.js b/app/assets/javascripts/editor/submissions.js index c247ea57..19b92265 100644 --- a/app/assets/javascripts/editor/submissions.js +++ b/app/assets/javascripts/editor/submissions.js @@ -205,6 +205,7 @@ CodeOceanEditorSubmissions = { this.createSubmission(button, null, function (response) { if (response.redirect) { this.autosaveIfChanged(); + this.stopCode(event); this.editors = []; Turbolinks.clearCache(); Turbolinks.visit(response.redirect);