From 0e5016b98d789ba744539493441ba9c8fe238ca1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 1 Jan 2017 11:42:53 +0100 Subject: [PATCH] Fixed work-around being applied to mobile --- wcfsetup/install/files/js/WCF.User.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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', ''); + } } } }; -- 2.20.1