Run button is now auto deselected, so pressing the spacebar no longer restarts the program
This commit is contained in:
@@ -276,7 +276,7 @@
|
|||||||
<button class="label-btn" title="PyStudio">
|
<button class="label-btn" title="PyStudio">
|
||||||
<p>PyStudio</p>
|
<p>PyStudio</p>
|
||||||
</button>
|
</button>
|
||||||
<button class="icon-btn" title="Run Code" onclick="runCurrentCode()">
|
<button id="runButton" class="icon-btn" title="Run Code" onclick="runCurrentCode()">
|
||||||
<svg viewBox="0 0 24 24">
|
<svg viewBox="0 0 24 24">
|
||||||
<path d="M8 5v14l11-7z" />
|
<path d="M8 5v14l11-7z" />
|
||||||
</svg>
|
</svg>
|
||||||
@@ -435,6 +435,10 @@
|
|||||||
|
|
||||||
function runCurrentCode() {
|
function runCurrentCode() {
|
||||||
stopCurrentCode();
|
stopCurrentCode();
|
||||||
|
|
||||||
|
document.getElementById('runButton').blur();
|
||||||
|
document.querySelector('canvas').focus();
|
||||||
|
|
||||||
if (term) term.clear();
|
if (term) term.clear();
|
||||||
StopExecution = false;
|
StopExecution = false;
|
||||||
var code = codeEditor.getValue();
|
var code = codeEditor.getValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user