input() bug on Skulpt?

367 Views Asked by At

Here's the code I'm using on Skulpt:

print('Intro text')
user_input = input('Prompt the user: ')
print(user_input)

The first thing that happens is an empty dialog box pops up, i.e. without the prompt. Only once something is entered in the dialog box does everything print to the output window:

Dialog box with empty text output window

Does anyone have any ideas?

(Right now, I'm using a workaround using time.sleep() before each input() -- ugh)

1

There are 1 best solutions below

0
On

You can try

Sk.inputfun = function(args){
    let response = window.prompt(args);
    console.log(response + "\n")
    return outf;
}