From 83eb4eeb1674b03a6965c7a49a080f653632dd04 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Tue, 14 Nov 2023 11:54:50 +0100 Subject: [PATCH] Make task description TinyMCE init in line with the vue one [SCI-9682] --- app/assets/javascripts/my_modules/protocols.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/my_modules/protocols.js b/app/assets/javascripts/my_modules/protocols.js index b294dec22..97f9d581a 100644 --- a/app/assets/javascripts/my_modules/protocols.js +++ b/app/assets/javascripts/my_modules/protocols.js @@ -12,7 +12,12 @@ var selectedRow = null; function initEditMyModuleDescription() { var viewObject = $('#my_module_description_view'); viewObject.on('click', function(e) { - if ($(e.target).hasClass('record-info-link') || $(e.target).parent().hasClass('record-info-link')) return; + if (e && $(e.target).prop("tagName") === 'A') return; + if (e && $(e.target).hasClass('atwho-user-popover')) return; + if (e && $(e.target).hasClass('record-info-link')) return; + if (e && $(e.target).parent().hasClass('record-info-link')) return; + if (e && $(e.target).parent().hasClass('atwho-inserted')) return; + TinyMCE.init( '#my_module_description_textarea', {