Added work-around for iOS Safari window height
authorAlexander Ebert <ebert@woltlab.com>
Sun, 8 Jan 2017 12:42:15 +0000 (13:42 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 8 Jan 2017 12:42:15 +0000 (13:42 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js
wcfsetup/install/files/style/ui/dialog.scss

index bfeb7d04cd30dae98f343921eee492773df2fbe6..52843b635644e4f76ad06017676c783945ae536e 100644 (file)
@@ -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() {
index e98393c18889e83f5c08c13c2965a34f47935f18..d4b69d9ba1ec4e67487db5bf66654cd7720b2cac 100644 (file)
        > .dialogContent {
                background-color: $wcfContentBackground;
                overflow: auto;
+               -webkit-overflow-scrolling: touch;
                
                &:not(.dialogContentNoPadding) {
                        @include screen-sm-down {