From 51815209c1d30a1c3f9ef5301ca5314f782bf8ae Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 4 Apr 2019 11:07:29 +0200 Subject: [PATCH] Revert "Removed an outdated workaround in dialogs for Chrome" This reverts commit c33729b9a32cc421db3495f1e695a950ff1c68dc. --- .../install/files/js/WoltLabSuite/Core/Ui/Dialog.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js index f25b31da26..d43a14dc95 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js @@ -579,6 +579,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') { -- 2.20.1