From 88b5f8904925db2bc3d1d79fe36fd1290b3394a3 Mon Sep 17 00:00:00 2001
From: srosse <stephane.rosse@frentix.com>
Date: Fri, 1 Feb 2019 11:52:28 +0100
Subject: [PATCH] OO-3843: don't close the edit panel after using a Tiny's
 popup

Don't close the edit panel if the user write and select a Latex formula,
a link or a special character
---
 .../webapp/static/js/jquery/openolat/jquery.contenteditor.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main/webapp/static/js/jquery/openolat/jquery.contenteditor.js b/src/main/webapp/static/js/jquery/openolat/jquery.contenteditor.js
index f5585dccb41..d6e1883cb56 100644
--- a/src/main/webapp/static/js/jquery/openolat/jquery.contenteditor.js
+++ b/src/main/webapp/static/js/jquery/openolat/jquery.contenteditor.js
@@ -78,7 +78,10 @@
 						|| jQuery(e.target).closest(".o_page_side_options").length > 0;
 					var excludedEls = jQuery(e.target).closest(".o_popover").length > 0
 						|| jQuery(e.target).closest(".o_page_add_in_container").length > 0
-						|| jQuery(e.target).closest(".mce-menu").length > 0;
+						|| jQuery(e.target).closest(".mce-menu").length > 0
+						|| jQuery(e.target).closest(".mce-window").length > 0
+						|| jQuery(e.target).closest(".mce-container").length > 0
+						|| jQuery(e.target).closest(".mce-widget").length > 0;
 					if(!edited && !excludedEls && jQuery(".o_layered_panel .modal-dialog").length == 0) {
 						o_XHREvent(componentUrl, false, false, 'cid', 'close_edit_fragment');
 					}
-- 
GitLab