From 22919e43bb6e4da87de9d4e1ec2bbca85166838b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 17 Jul 2016 15:12:30 +0200 Subject: [PATCH] Improved inline editing checks --- .../files/js/WoltLab/WCF/Ui/Message/InlineEditor.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js index 236de58d4c..93b531be25 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js @@ -68,7 +68,7 @@ define( if (button !== null) { canEdit = elDataBool(element, 'can-edit'); - if (this._options.canEditInline) { + if (this._options.canEditInline || elDataBool(element, 'can-edit-inline')) { button.addEventListener(WCF_CLICK_EVENT, this._clickDropdown.bind(this, element)); button.classList.add('jsDropdownEnabled'); @@ -248,6 +248,13 @@ define( else { if (objOwns(visibility, item) && visibility[item] === false) { elHide(listItem); + + // check if previous item was a divider + if (i > 0 && i + 1 === this._dropdownMenu.childElementCount) { + if (elData(listItem.previousElementSibling, 'item') === 'divider') { + elHide(listItem.previousElementSibling); + } + } } else { elShow(listItem); -- 2.20.1