From 2d667acdd11d67e2d49d9073c58fc99ce88f9e26 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Tue, 22 Sep 2020 10:56:40 +0200 Subject: [PATCH] Prevent tinymce edit mode when link click --- app/assets/javascripts/my_modules/protocols.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/my_modules/protocols.js b/app/assets/javascripts/my_modules/protocols.js index 76a7db020..96e97bbd1 100644 --- a/app/assets/javascripts/my_modules/protocols.js +++ b/app/assets/javascripts/my_modules/protocols.js @@ -13,6 +13,8 @@ function initEditMyModuleDescription() { var viewObject = $('#my_module_description_view'); viewObject.on('click', function() { TinyMCE.init('#my_module_description_textarea'); + }).on('click', 'a', function(e) { + e.stopPropagation(); }); TinyMCE.initIfHasDraft(viewObject); } @@ -21,6 +23,8 @@ function initEditProtocolDescription() { var viewObject = $('#protocol_description_view'); viewObject.on('click', function() { TinyMCE.init('#protocol_description_textarea', refreshProtocolStatusBar); + }).on('click', 'a', function(e) { + e.stopPropagation(); }); TinyMCE.initIfHasDraft(viewObject); }