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">
|
||||
<p>PyStudio</p>
|
||||
</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">
|
||||
<path d="M8 5v14l11-7z" />
|
||||
</svg>
|
||||
@@ -435,6 +435,10 @@
|
||||
|
||||
function runCurrentCode() {
|
||||
stopCurrentCode();
|
||||
|
||||
document.getElementById('runButton').blur();
|
||||
document.querySelector('canvas').focus();
|
||||
|
||||
if (term) term.clear();
|
||||
StopExecution = false;
|
||||
var code = codeEditor.getValue();
|
||||
|
||||
Reference in New Issue
Block a user