inseven / opolua

A compiled-OPL interpreter for iOS written in Lua
https://opolua.org
MIT License
12 stars 0 forks source link

Ensure cursor is not obscured by iOS onscreen keyboard #425

Open tomsci opened 1 month ago

tomsci commented 1 month ago

By implementing Program.textEditor() which provides hints to the Swift side about where any text cursor on screen is, and maybe moving the program view up to ensure it's not obscured by the onscreen keyboard.

kapfab commented 1 month ago

I don't remember this was already like in previous releases, the OPL app view bumps while returning to its normal position when the iOS keyboard dismisses (landscape mode only).

Also, the title of the (transparent) navigation bar overlaps the app view. Not a big deal usually but I guess it could overlap the contents of the input field itself if it's a dEDITMULTI.

jbmorley commented 1 month ago

Yeah. There's still a bunch of little tweaks to be done to the animation and heuristics for ensuring the text box avoids the keyboard. You're right in that this is a change from the shipping code as we didn't have native text boxes and were kicking out to an iOS native dialog.

jbmorley commented 1 month ago

I expect the navigation bar to overlap the app view, but it looks like a weird little iOS bug that we've lost the 'thin material' background for the navigation bar. Good to get it recorded here though as I'd already forgotten about it. 🙃