Skip to content

A platform for community discussion. Free, open, simple.

FIX: Adjust composer size for iPhone Xs Max and Xʀ

Penar Musarajc468abe9d0cf
diff --git a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
index b063a8094a5..fa619da659d 100644
--- a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
+++ b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
@@ -41,6 +41,11 @@ function calcHeight() {
withoutKeyboard = smallViewport ? 340 : 370;
}
+ // iPhone Xs Max and iPhone Xʀ
+ if (window.screen.height === 896) {
+ withoutKeyboard = smallViewport ? 410 : 440;
+ }
+
// iPad can use innerHeight cause it renders nothing in the footer
if (window.innerHeight > 920) {
withoutKeyboard -= 45;