File tree Expand file tree Collapse file tree
src/components/InteractivePython Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,17 +157,25 @@ export default function InteractivePython({ children }) {
157157 < pre ref = { outputRef } className = { styles . output } />
158158 < div ref = { inputContainerRef } className = { styles . inputForm } style = { { display : 'none' } } >
159159 < span ref = { inputPromptRef } className = { styles . promptText } />
160- < input
161- ref = { inputFieldRef }
162- type = "text"
163- className = { styles . terminalInput }
164- onKeyDown = { ( e ) => {
165- if ( e . key === 'Enter' ) {
166- e . preventDefault ( ) ;
167- submitInput ( ) ;
168- }
169- } }
170- />
160+ < form
161+ ref = { inputContainerRef }
162+ className = { styles . inputForm }
163+ style = { { display : 'none' } }
164+ onSubmit = { ( e ) => {
165+ e . preventDefault ( ) ;
166+ submitInput ( ) ;
167+ } }
168+ >
169+ < span ref = { inputPromptRef } className = { styles . promptText } />
170+ < input
171+ ref = { inputFieldRef }
172+ type = "text"
173+ className = { styles . terminalInput }
174+ />
175+ < button type = "submit" className = { styles . submitInputBtn } >
176+ Enter ↵
177+ </ button >
178+ </ form >
171179 < button type = "button" className = { styles . submitInputBtn } onClick = { submitInput } >
172180 Enter ↵
173181 </ button >
You can’t perform that action at this time.
0 commit comments