Hiding the tooltip did not reset all position styles
authorAlexander Ebert <ebert@woltlab.com>
Mon, 21 May 2018 10:02:34 +0000 (12:02 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 21 May 2018 10:02:34 +0000 (12:02 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Tooltip.js

index ce7acaf900068bb34fba186bdd5c24cc67c7d371..e819aac1f87dd5126f6af08917e2fe2b2fb14810 100644 (file)
@@ -33,8 +33,9 @@ define(['Environment', 'Dom/ChangeListener', 'Ui/Alignment'], function(Environme
                                if (!_tooltip.classList.contains('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');
+                                       ['bottom', 'left', 'right', 'top'].forEach(function(property) {
+                                               _tooltip.style.removeProperty(property);
+                                       });
                                }
                        });