Properly disable body scrolling when overlays are active
authorAlexander Ebert <ebert@woltlab.com>
Sun, 2 Oct 2016 07:48:01 +0000 (09:48 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 2 Oct 2016 07:48:01 +0000 (09:48 +0200)
Also works around a strange bug in Chrome for Android that causes the
form submit buttons to vanish if page is being scrolled.

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js

index 42b4012d7a11f2140d005748dcd31c2caef27d96..e1615e13bf8981da51c8a13432b2a107bbf494c6 100644 (file)
@@ -242,6 +242,9 @@ define(
                                        }
                                }).bind(this), 200);
                        }
+                       else if (Environment.platform() !== 'desktop') {
+                               UiScreen.scrollDisable();
+                       }
                        
                        return data;
                },
@@ -574,7 +577,7 @@ define(
                                elData(_container, 'close-on-click', (data.backdropCloseOnClick ? 'true' : 'false'));
                        }
                        
-                       if (Environment.platform() === 'ios') {
+                       if (Environment.platform() !== 'desktop') {
                                UiScreen.scrollEnable();
                        }
                },