From: Aleksander Ɓukasz Date: Thu, 24 Apr 2014 07:13:59 +0000 (+0200) Subject: editor: minor usability tweak X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/bb204203f5f64dd13b256263fd398e1463d4eaf9?ds=sidebyside editor: minor usability tweak Make toolbar paragraph/header icon active even when already in a paragraph/header. --- diff --git a/src/editor/plugins/core/switch.js b/src/editor/plugins/core/switch.js index ff49eb8..edb8e95 100644 --- a/src/editor/plugins/core/switch.js +++ b/src/editor/plugins/core/switch.js @@ -41,7 +41,7 @@ var createSwitchAction = function(createParams) { description = gettext('Switch to') + ' ' + createParams.to.name; return _.extend(state, { - allowed: !!toSwitch, + allowed: !!toSwitch || alreadyInTarget, toggled: alreadyInTarget, description: description, execute: alreadyInTarget ? function() {} : function(callback) {