Fix addComment button
parent
49d037a085
commit
7ba88751eb
|
@ -170,4 +170,4 @@
|
|||
}
|
||||
});
|
||||
|
||||
})();
|
||||
})();
|
||||
|
|
|
@ -723,7 +723,8 @@ define([
|
|||
node: node,
|
||||
button: button
|
||||
};
|
||||
$(button).click(function () {
|
||||
$(button).click(function (e) {
|
||||
e.stopPropagation();
|
||||
Env.editor.execCommand('comment');
|
||||
Env.bubble = undefined;
|
||||
});
|
||||
|
@ -745,6 +746,8 @@ define([
|
|||
return;
|
||||
}
|
||||
|
||||
// Remove active class on other comments
|
||||
Env.$container.find('.cp-comment-active').removeClass('cp-comment-active');
|
||||
Env.$container.find('.cp-comment-form').remove();
|
||||
var form = getCommentForm(Env, false, function (val) {
|
||||
$(form).remove();
|
||||
|
@ -835,6 +838,9 @@ define([
|
|||
if ($(e.target).closest('.cp-comment-container').length) {
|
||||
return;
|
||||
}
|
||||
// Add comment button? don't remove anything because this handler is called after
|
||||
// the button action
|
||||
if (e.target.classList.contains('cke_button__comment_icon')) { return; }
|
||||
Env.$container.find('.cp-comment-active').removeClass('cp-comment-active');
|
||||
Env.$inner.find('comment.active').removeClass('active');
|
||||
Env.$container.find('.cp-comment-form').remove();
|
||||
|
|
Loading…
Reference in New Issue