The thing with TUIs is that, using mobile native virtual keyboards, it's apparently quite impossible to make them behave in a sane way in browsers!
I think the only reasonable option seems to be reimplementing one yourself, which is massively stupid.
If you have a TUI the correct way to support mobile browsers is to 1-shot a React page equivalent. Trying to make the mobile keyboard work for this would be silly.
Mobile is not for TUI