Working around layout rounding errors
authorAlexander Ebert <ebert@woltlab.com>
Mon, 24 Oct 2016 16:12:42 +0000 (18:12 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 24 Oct 2016 16:12:42 +0000 (18:12 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js

index 01596f010904534235bf3e715efb9cda8e38f70c..8ef70ca2c5c770c56c88e500521feb78fd507159 100644 (file)
@@ -473,6 +473,12 @@ define(
                                formSubmit.classList.add('dialogFormSubmit');
                                
                                unavailableHeight += DomUtil.outerHeight(formSubmit);
+                               
+                               // Calculated height can be a fractional value and depending on the
+                               // browser the results can vary. By subtracting a single pixel we're
+                               // working around fractional values, without visually changing anything.
+                               unavailableHeight -= 1;
+                               
                                contentContainer.style.setProperty('margin-bottom', unavailableHeight + 'px', '');
                        }
                        else {