From 08a394cad0b41cf80aabeb26fa7efaeefee4bca0 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 10 Jul 2025 09:47:09 +0200 Subject: [PATCH] add eventListener to prevent bootstrap dialog from blocking focusin in tinymce linking popup --- .../Messages/Details/NewMessage/Modal.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/public/js/components/Messages/Details/NewMessage/Modal.js b/public/js/components/Messages/Details/NewMessage/Modal.js index 9c9bcd4cd..57573a9ba 100644 --- a/public/js/components/Messages/Details/NewMessage/Modal.js +++ b/public/js/components/Messages/Details/NewMessage/Modal.js @@ -68,7 +68,16 @@ export default { target: this.$refs.editor.$refs.input, //Important: not selector: to enable multiple import of component //height: 800, //plugins: ['lists'], - toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify', + toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | link', + plugins: 'link linktitle', + link_context_toolbar: true, + automatic_uploads: true, + default_link_target: "_blank", + link_title: true, + target_list: [ + { title: 'New tab', value: '_blank' }, + { title: 'Same tab', value: '_self' } + ], style_formats: [ {title: 'Blocks', block: 'div'}, {title: 'Paragraph', block: 'p'}, @@ -88,7 +97,15 @@ export default { const newContent = editor.getContent(); vm.formData.body = newContent; }); + + // Prevent Bootstrap dialog from blocking focusin + document.addEventListener('focusin', (e) => { + if (e.target.closest(".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root") !== null) { + e.stopImmediatePropagation(); + } + }); }, + }); }, updateText(value) {