Skip to content

Commit b6e652c

Browse files
committed
fix popup click on disabled action
1 parent 797e69e commit b6e652c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

morrigan-jquery-editor.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -967,13 +967,17 @@ $.widget( "morrigan.morrigan_editor", {
967967

968968
this._bindEventsToPopupAction = function (action) {
969969
action.element.on('click', function () {
970-
editor._popup.showPopup(action);
970+
if (action.enabled) {
971+
editor._popup.showPopup(action);
972+
}
971973
});
972974
};
973975

974976
this._bindEventsToSimpleAction = function (action) {
975977
action.element.on('click', function () {
976-
action.onClickHandler(editor, action);
978+
if (action.enabled) {
979+
action.onClickHandler(editor, action);
980+
}
977981
});
978982
};
979983

0 commit comments

Comments
 (0)