From 9585cc862cc4394243f5e761dbcae1a56c98a28e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 23 Aug 2016 16:46:50 +0200 Subject: [PATCH] Fixed invisible tooltip being outside of viewport --- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Tooltip.js | 5 +++++ wcfsetup/install/files/style/ui/tooltip.scss | 1 + 2 files changed, 6 insertions(+) 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; -- 2.20.1