From 7992cd97a10510bbbfc85e9c0ac6d65cce12cbb9 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 5 Aug 2022 11:23:36 +0200 Subject: [PATCH] Fix smart annotation on step text and checklist [SCI-7059] --- app/javascript/vue/shared/inline_edit.vue | 3 +++ app/javascript/vue/shared/tinymce.vue | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/javascript/vue/shared/inline_edit.vue b/app/javascript/vue/shared/inline_edit.vue index 89952cdf4..12da31c4b 100644 --- a/app/javascript/vue/shared/inline_edit.vue +++ b/app/javascript/vue/shared/inline_edit.vue @@ -117,6 +117,9 @@ }, enableEdit(e) { if (e && $(e.target).hasClass('atwho-user-popover')) return + if (e && $(e.target).hasClass('record-info-link')) return + if (e && $(e.target).parent().hasClass('atwho-inserted')) return + this.editing = true; this.focus(); this.$nextTick(() => { diff --git a/app/javascript/vue/shared/tinymce.vue b/app/javascript/vue/shared/tinymce.vue index 0c4303642..e2848ef39 100644 --- a/app/javascript/vue/shared/tinymce.vue +++ b/app/javascript/vue/shared/tinymce.vue @@ -118,8 +118,13 @@ } }, methods: { - initTinymce() { + initTinymce(e) { let textArea = `#${this.objectType}_textarea_${this.objectId}`; + + if (e && $(e.target).hasClass('atwho-user-popover')) return + if (e && $(e.target).hasClass('record-info-link')) return + if (e && $(e.target).parent().hasClass('atwho-inserted')) return + TinyMCE.init(textArea, (data) => { if (data) { this.$emit('update', data)