Revert "Removed an outdated workaround in dialogs for Chrome"
authorAlexander Ebert <ebert@woltlab.com>
Thu, 4 Apr 2019 09:07:29 +0000 (11:07 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 5 Oct 2019 11:28:37 +0000 (13:28 +0200)
This reverts commit c33729b9a32cc421db3495f1e695a950ff1c68dc.

(cherry picked from commit 51815209c1d30a1c3f9ef5301ca5314f782bf8ae)

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js

index 1e95132cf288b21e1368c4040d166882e324e553..038c1931bffc4a12234b7d9f48ddb744a899cffb 100644 (file)
@@ -662,6 +662,16 @@ define(
                        var maximumHeight = (window.innerHeight * (_dialogFullHeight ? 1 : 0.8)) - unavailableHeight;
                        contentContainer.style.setProperty('max-height', ~~maximumHeight + 'px', '');
                        
+                       // fix for a calculation bug in Chrome causing the scrollbar to overlap the border
+                       if (Environment.browser() === 'chrome') {
+                               if (data.content.scrollHeight > maximumHeight) {
+                                       data.content.style.setProperty('margin-right', '-1px', '');
+                               }
+                               else {
+                                       data.content.style.removeProperty('margin-right');
+                               }
+                       }
+                       
                        // Chrome and Safari use heavy anti-aliasing when the dialog's width
                        // cannot be evenly divided, causing the whole text to become blurry
                        if (Environment.browser() === 'chrome' || Environment.browser() === 'safari') {