diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-03-31 16:56:32 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-03-31 16:56:32 +0300 |
commit | 3546d7aa02bc65cf1183cb493adeb543ba51945d (patch) | |
tree | d386280609e58fb6670eb42fbd2d9a44c5b28504 /client/components/main/editor.js | |
parent | 29d62440a5cf82b01de8183a384c6d7811abad81 (diff) | |
download | wekan-3546d7aa02bc65cf1183cb493adeb543ba51945d.tar.gz wekan-3546d7aa02bc65cf1183cb493adeb543ba51945d.tar.bz2 wekan-3546d7aa02bc65cf1183cb493adeb543ba51945d.zip |
Fix Browser always reload the whole page when I change one of the card color.
Fixed by making label colors and text again editable.
Regression from [Wekan v3.86 2)](https://github.com/wekan/wekan/commit/b9099a8b7ea6f63c79bdcbb871cb993b2cb7e325).
Thanks to javen9881 and xet7 !
Closes #2971
Diffstat (limited to 'client/components/main/editor.js')
-rwxr-xr-x | client/components/main/editor.js | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/client/components/main/editor.js b/client/components/main/editor.js index 3f09d284..86c0078f 100755 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -30,7 +30,7 @@ Template.editor.onRendered(() => { autosize($textarea); $textarea.escapeableTextComplete(mentions); }; - if (Meteor.settings.public.RICHER_CARD_COMMENT_EDITOR === 'true') { + if (Meteor.settings.public.RICHER_CARD_COMMENT_EDITOR !== false) { const isSmall = Utils.isMiniScreen(); const toolbar = isSmall ? [ @@ -108,37 +108,10 @@ Template.editor.onRendered(() => { } return undefined; }; - // Prevent @member mentions on Add Comment input field - // from closing card, part 1. - let popupShown = false; inputs.each(function(idx, input) { mSummernotes[idx] = $(input).summernote({ placeholder, - // Prevent @member mentions on Add Comment input field - // from closing card, part 2. - onKeydown(e) { - if (popupShown) { - e.preventDefault(); - } - }, - onKeyup(e) { - if (popupShown) { - e.preventDefault(); - } - }, callbacks: { - // Prevent @member mentions on Add Comment input field - // from closing card, part 3. - onKeydown(e) { - if (popupShown) { - e.preventDefault(); - } - }, - onKeyup(e) { - if (popupShown) { - e.preventDefault(); - } - }, onInit(object) { const originalInput = this; $(originalInput).on('input', function() { @@ -163,6 +136,7 @@ Template.editor.onRendered(() => { }); } }, + onImageUpload(files) { const $summernote = getSummernote(this); if (files && files.length > 0) { @@ -323,8 +297,7 @@ Blaze.Template.registerHelper( } const linkValue = [' ', at, knowedUser.username]; - //let linkClass = 'atMention js-open-member'; - let linkClass = 'atMention'; + let linkClass = 'atMention js-open-member'; if (knowedUser.userId === Meteor.userId()) { linkClass += ' me'; } @@ -367,10 +340,7 @@ Template.viewer.events({ const userId = event.currentTarget.dataset.userid; if (userId) { - // Prevent @member mentions on Add Comment input field - // from closing card, part 4. - PopupNoClose.open('member').call({ userId }, event, templateInstance); - event.preventDefault(); + Popup.open('member').call({ userId }, event, templateInstance); } else { const href = event.currentTarget.href; if (href) { |