@@ -94,6 +94,7 @@ class AppComponent extends React.Component {
9494const showPythonTutor = page_index >= _ . findIndex ( pages , { slug :"UnderstandingProgramsWithPythonTutor" } ) ;
9595const showBirdseye = page_index >= _ . findIndex ( pages , { slug :"IntroducingBirdseye" } ) ;
9696
97+ const cantUseEditor = prediction . state === "waiting" || prediction . state === "showingResult" ;
9798return < div className = "book-container" >
9899< div className = "book-text markdown-body"
99100onCopy = { checkCopy } >
@@ -143,7 +144,7 @@ class AppComponent extends React.Component {
143144< div className = "ide" >
144145< div className = { "editor-buttons " + ( showEditor ?"" :"invisible" ) } >
145146< button
146- disabled = { prediction . state === "waiting" }
147+ disabled = { cantUseEditor }
147148className = "btn btn-primary"
148149onClick = { ( ) => {
149150this . runCode ( { source :"editor" } ) ;
@@ -156,7 +157,7 @@ class AppComponent extends React.Component {
156157
157158{ showSnoop &&
158159< button
159- disabled = { prediction . state === "waiting" }
160+ disabled = { cantUseEditor }
160161className = "btn btn-success"
161162onClick = { ( ) => {
162163this . runCode ( { source :"snoop" } )
@@ -169,7 +170,7 @@ class AppComponent extends React.Component {
169170
170171{ showPythonTutor &&
171172< button
172- disabled = { prediction . state === "waiting" }
173+ disabled = { cantUseEditor }
173174className = "btn btn-success"
174175onClick = { ( ) => {
175176this . runCode ( { source :"pythontutor" } ) ;
@@ -195,7 +196,7 @@ class AppComponent extends React.Component {
195196
196197{ showBirdseye &&
197198< button
198- disabled = { prediction . state === "waiting" }
199+ disabled = { cantUseEditor }
199200className = "btn btn-success"
200201onClick = { ( ) => {
201202this . runCode ( { source :"birdseye" } )
@@ -232,7 +233,7 @@ class AppComponent extends React.Component {
232233setOptions = { {
233234fontFamily :"monospace"
234235} }
235- readOnly = { prediction . state === "waiting" }
236+ readOnly = { cantUseEditor }
236237/>
237238</ div >
238239< div className = "terminal" >