From: Marcel Werk Date: Wed, 24 Aug 2016 15:18:32 +0000 (+0200) Subject: Fixed broken clear content in popovers X-Git-Tag: 3.0.0_Beta_1~523 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8821cb15d7a5a1093aa985ae4ba258e1387bb0ea;p=GitHub%2FWoltLab%2FWCF.git Fixed broken clear content in popovers --- 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();