josh.js icon indicating copy to clipboard operation
josh.js copied to clipboard

mobile compatibility

Open moore3071 opened this issue 9 years ago • 2 comments

Currently on mobile (Android Marshmellow using Chrome or Firefox) the javascript seems to run fine (there is a blinking cursor), but the field is not accessible to input and the keyboard won't appear for input.

moore3071 avatar Aug 18 '16 18:08 moore3071

The problem as far as I can tell is that mobile keyboards only show up when a textbox has focus. Since josh emulates its own input for the shell, it's just listening to keypresses, but mobile browsers do not know that.

sdether avatar Aug 18 '16 19:08 sdether

That makes sense. Looking over the code I can only come up with one possible solution (and it's hacky).

It might be possible to have a text input field in the foreground over the console that sets readline to active when focused. Meanwhile js would intercept the input and pass it to readline.

moore3071 avatar Aug 19 '16 00:08 moore3071