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

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

diff --git a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
index b063a80..fa619da 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;

GitHub sha: c468abe9

1 Like