From: Alexander Ebert Date: Sun, 1 Jan 2017 10:42:53 +0000 (+0100) Subject: Fixed work-around being applied to mobile X-Git-Tag: 3.0.0_RC_4~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0e5016b98d789ba744539493441ba9c8fe238ca1;p=GitHub%2FWoltLab%2FWCF.git Fixed work-around being applied to mobile --- diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index cd9015dea9..05e35bd61d 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -607,10 +607,12 @@ WCF.User.QuickLogin = { if (loginSection !== null && registrationBlock !== null) { var loginOffset = loginSection.offsetTop; var margin = 0; - while (loginOffset < (registrationBlock.offsetTop - 50)) { - // push the registration down by 100 pixel each time - margin += 100; - loginSection.style.setProperty('margin-bottom', margin + 'px', ''); + if (loginForm.clientWidth > loginSection.clientWidth * 2) { + while (loginOffset < (registrationBlock.offsetTop - 50)) { + // push the registration down by 100 pixel each time + margin += 100; + loginSection.style.setProperty('margin-bottom', margin + 'px', ''); + } } } };