diff --git a/bootstrap-wysiwyg.js b/bootstrap-wysiwyg.js index 69f64a7..001bc88 100644 --- a/bootstrap-wysiwyg.js +++ b/bootstrap-wysiwyg.js @@ -27,7 +27,7 @@ if (options.activeToolbarClass) { $(options.toolbarSelector).find(toolbarBtnSelector).each(function () { var command = $(this).data(options.commandRole); - if (document.queryCommandState(command)) { + if (document.queryCommandEnabled(command) && document.queryCommandState(command)) { $(this).addClass(options.activeToolbarClass); } else { $(this).removeClass(options.activeToolbarClass);