From: Alexander Ebert Date: Tue, 23 Aug 2016 14:46:50 +0000 (+0200) Subject: Fixed invisible tooltip being outside of viewport X-Git-Tag: 3.0.0_Beta_1~566 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9585cc862cc4394243f5e761dbcae1a56c98a28e;p=GitHub%2FWoltLab%2FWCF.git Fixed invisible tooltip being outside of viewport --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Tooltip.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Tooltip.js index e5ad33f701..625779e49c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Tooltip.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Tooltip.js @@ -114,6 +114,11 @@ define(['Environment', 'Dom/ChangeListener', 'Ui/Alignment'], function(Environme */ _mouseLeave: function() { _tooltip.classList.remove('active'); + + // reset back to the upper left corner, prevent it from staying outside + // the viewport if the body overflow was previously hidden + _tooltip.style.removeProperty('top'); + _tooltip.style.removeProperty('left'); } }; }); diff --git a/wcfsetup/install/files/style/ui/tooltip.scss b/wcfsetup/install/files/style/ui/tooltip.scss index fcfb7b6587..61e7fcf93a 100644 --- a/wcfsetup/install/files/style/ui/tooltip.scss +++ b/wcfsetup/install/files/style/ui/tooltip.scss @@ -3,6 +3,7 @@ border-radius: 2px; box-shadow: 0 0 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24); color: $wcfTooltipText; + left: 0; max-width: 300px; padding: 5px 10px; pointer-events: none;