From 05f164a2e51333f95cc6d885561118756347839b Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 4 May 2020 12:20:18 +0200 Subject: [PATCH] Fix issue with the addComment button in the toolbar --- www/pad/comments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/pad/comments.js b/www/pad/comments.js index efb9f7b6e..0a3eccf3e 100644 --- a/www/pad/comments.js +++ b/www/pad/comments.js @@ -896,7 +896,8 @@ define([ if ($target.closest('.ui-autocomplete').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; } + if ($target.is('.cke_button__comment')) { return; } + if ($target.closest('.cke_button__comment').length) { 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();