From 591a4f0f3260c8a09100e7dafa3956d0d904da1f Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 21 Nov 2022 11:52:32 +0200 Subject: [PATCH] wysiwyg click event --- client/src/views/fields/wysiwyg.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/client/src/views/fields/wysiwyg.js b/client/src/views/fields/wysiwyg.js index f0a414db5d..8b206b549f 100644 --- a/client/src/views/fields/wysiwyg.js +++ b/client/src/views/fields/wysiwyg.js @@ -342,9 +342,26 @@ define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], function $img.css('max-width', '100%'); }); - let $document = $(documentElement); + // Make dropdowns closed. + $document.on('click', () => { + let event = new MouseEvent('click', { + bubbles: true, + }); + + $iframe[0].dispatchEvent(event); + }); + + // Make notifications & global-search popup closed. + $document.on('mouseup', () => { + let event = new MouseEvent('mouseup', { + bubbles: true, + }); + + $iframe[0].dispatchEvent(event); + }); + let processWidth = function () { let bodyElement = $body.get(0);