Skip to content

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

UX: allow for iPhone X in iOS Hacks

Same63a2487e375
diff --git a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
index 7cb249b15e2..9e3a72c6cfa 100644
--- a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
+++ b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
@@ -33,6 +33,12 @@ function calcHeight() {
if (window.screen.height === 736) {
withoutKeyboard = smallViewport ? 353 : 383;
}
+
+ // iPhone X
+ if (window.screen.height === 812) {
+ withoutKeyboard = smallViewport ? 340 : 370;
+ }
+
// iPad can use innerHeight cause it renders nothing in the footer
if (window.innerHeight > 920) {
withoutKeyboard -= 45;