From 62c7bd1ddcd730f2a9bedc6813771387d63fba59 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 30 Aug 2016 11:07:38 +0200 Subject: [PATCH] Added missing button active states --- .../files/js/3rdParty/redactor2/plugins/WoltLabButton.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js index 27aca9d697..c5cd1ed400 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js @@ -31,12 +31,18 @@ $.Redactor.prototype.WoltLabButton = function() { //noinspection JSUnresolvedVariable buttonData = this.opts.woltlab.buttons[buttonName]; + if (buttonName === 'underline') { + this.opts.activeButtonsStates.u = 'underline' + } switch (buttonName) { case 'subscript': case 'superscript': button = this.button.addAfter(this.opts.buttons[i - 1], buttonName, ''); this.button.setEvent(button, buttonName, { func: 'inline.format' }); + + this.opts.activeButtonsStates[(buttonName === 'subscript' ? 'sub' : 'sup')] = buttonName; + break; case 'redo': -- 2.20.1