From e8d274a4a4c652c6e4e81ab986df9f2d9bf3f5c6 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 28 Oct 2020 13:19:59 +0100 Subject: [PATCH] Allow clicking on submit only once --- app/assets/javascripts/editor/editor.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/editor/editor.js.erb b/app/assets/javascripts/editor/editor.js.erb index 3ac57856..7de058d5 100644 --- a/app/assets/javascripts/editor/editor.js.erb +++ b/app/assets/javascripts/editor/editor.js.erb @@ -377,7 +377,7 @@ var CodeOceanEditor = { initializeWorkspaceButtons: function () { - $('#submit').on('click', this.submitCode.bind(this)); + $('#submit').one('click', this.submitCode.bind(this)); $('#assess').on('click', this.scoreCode.bind(this)); $('#dropdown-render, #render').on('click', this.renderCode.bind(this)); $('#dropdown-run, #run').on('click', this.runCode.bind(this));