From 8821cb15d7a5a1093aa985ae4ba258e1387bb0ea Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 24 Aug 2016 17:18:32 +0200 Subject: [PATCH] Fixed broken clear content in popovers --- .../install/files/js/WoltLabSuite/Core/Controller/Popover.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Popover.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Popover.js index a10ac9f892..9434bf12bc 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Popover.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Popover.js @@ -200,7 +200,9 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' throw new Error("Unable to find element for object id '" + objectId + "' (identifier: '" + identifier + "')."); } - data.content = DomUtil.createFragmentFromHtml(content); + var fragment = DomUtil.createFragmentFromHtml(content); + if (!fragment.childElementCount) fragment = DomUtil.createFragmentFromHtml('

' + content + '

'); + data.content = fragment; data.state = STATE_READY; if (_activeId) { @@ -298,6 +300,7 @@ define(['Ajax', 'Dictionary', 'Environment', 'Dom/ChangeListener', 'Dom/Util', ' _popover.classList.add('forceHide'); // force layout + //noinspection BadExpressionStatementJS _popover.offsetTop; this._clearContent(); -- 2.20.1