Fixed work-around being applied to mobile
authorAlexander Ebert <ebert@woltlab.com>
Sun, 1 Jan 2017 10:42:53 +0000 (11:42 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 1 Jan 2017 10:42:53 +0000 (11:42 +0100)
wcfsetup/install/files/js/WCF.User.js

index cd9015dea95fe5f1cdad9d24903c87140dfe5561..05e35bd61dc716c84232af102395e270905b7bed 100644 (file)
@@ -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', '');
+                                               }
                                        }
                                }
                        };