From e439e96be487f928a800c5ab3759ecc58833b4cd Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 8 Jan 2017 13:42:15 +0100 Subject: [PATCH] Added work-around for iOS Safari window height --- .../install/files/js/WoltLabSuite/Core/Ui/Dialog.js | 12 ++++++++++++ wcfsetup/install/files/style/ui/dialog.scss | 1 + 2 files changed, 13 insertions(+) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js index bfeb7d04cd..52843b6356 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js @@ -73,6 +73,18 @@ define( DomChangeListener.add('Ui/Dialog', this._initStaticDialogs.bind(this)); UiScreen.setDialogContainer(_container); + + // mobile safari dynamically shows/hides the bottom browser bar + // causing the window height to differ significantly + if (Environment.platform() === 'ios') { + window.addEventListener('resize', (function () { + _dialogs.forEach((function (dialog) { + if (!elAttrBool(dialog.dialog, 'aria-hidden')) { + this.rebuild(elData(dialog.dialog, 'id')); + } + }).bind(this)); + }).bind(this)); + } }, _initStaticDialogs: function() { diff --git a/wcfsetup/install/files/style/ui/dialog.scss b/wcfsetup/install/files/style/ui/dialog.scss index e98393c188..d4b69d9ba1 100644 --- a/wcfsetup/install/files/style/ui/dialog.scss +++ b/wcfsetup/install/files/style/ui/dialog.scss @@ -108,6 +108,7 @@ > .dialogContent { background-color: $wcfContentBackground; overflow: auto; + -webkit-overflow-scrolling: touch; &:not(.dialogContentNoPadding) { @include screen-sm-down { -- 2.20.1