Inert/Edit Link and Source Code plugin cannot be work properly in TinyMCE
What is the current behavior? The issue comes from "Insert/Edit Link" and "Source Code" plugin inside TinyMCE. I put a bit concern in the flow when the focus is missing, this issue appears. But, i've tried to fix this by myself, search on the internet and evem ask to AI, but still got the same issue over and over again. Please help me to overcome this guys Thank you very much
this is the setup that i use for using TinyMCE
and this is the screen record for the issue
https://github.com/user-attachments/assets/452a767d-bf8a-42dc-a558-56a80d0516c8
What is the expected behavior? The TinyMCE able to edit the link and the code plugins
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-react?
"@tinymce/tinymce-react": "^5.1.1",
Do you have the same issue with the image dialog or any other TinyMCE's own dialog? If so, I suspect you have a focus trapping issue where the modal, on which tinymce is loaded, trap the focus within itself, making TinyMCE's own dialogs uneditable or unfocusable. Try this approach
document.addEventListener('focusin', (e) => {
if (e.target.closest(".tox-tinymce, .tox-tinymce-aux, .moxman-window, .tam-assetmanager-root") !== null) {
e.stopImmediatePropagation();
}
});