Fixed a scroll issue on iOS
authorAlexander Ebert <ebert@woltlab.com>
Tue, 11 Oct 2016 07:59:24 +0000 (09:59 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 11 Oct 2016 07:59:24 +0000 (09:59 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Mobile.js

index e8a7be88190e9a93b5ac0983d202416a8764120d..9c08fe0a902dbcd1d974f433ab3ccd48d42c64a3 100644 (file)
@@ -143,9 +143,11 @@ define(
                        _main.addEventListener(WCF_CLICK_EVENT, function() {
                                _searchBar.classList.remove('open');
                                
-                               if (Environment.platform() === 'ios') {
+                               if (Environment.platform() === 'ios' && scrollTop !== null) {
                                        UiScreen.scrollEnable();
                                        document.body.scrollTop = scrollTop; 
+                                       
+                                       scrollTop = null;
                                }
                        });
                },