I’ll take a crack at this, removing 10% of height for the editor on iOS.
https://github.com/discourse/discourse/commit/c191e2e84c3c52f886e772f8b2a4c7efaaa690d1
I believe it is impossible to get the actual viewport size because the browser does not communicate the size of any of the on-screen phone UI (keyboard, autocomplete, etc).
The guesstimate ratios we are using now for iOS are
- 45% of screen no matter what you’re doing (creating a topic, or writing a reply)