mirror of
https://github.com/discourse/discourse.git
synced 2025-03-15 04:45:27 +08:00
UX: allow for iPhone X in iOS Hacks
This commit is contained in:
parent
30ddc1f222
commit
e63a2487e3
@ -33,6 +33,12 @@ function calcHeight() {
|
|||||||
if (window.screen.height === 736) {
|
if (window.screen.height === 736) {
|
||||||
withoutKeyboard = smallViewport ? 353 : 383;
|
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
|
// iPad can use innerHeight cause it renders nothing in the footer
|
||||||
if (window.innerHeight > 920) {
|
if (window.innerHeight > 920) {
|
||||||
withoutKeyboard -= 45;
|
withoutKeyboard -= 45;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user