Closed ucimo closed 2 months ago
Hi @obrovacm ,
Have you tried our React or Angular integrations:
Is this what you were looking for?
Tyler
Hi @tylerkelly13 ,
No, I need to prevent bootstrap dialog/modal from blocking focusin on tinymce link dialog and I don't want to import JQuery just for that single task. So I'm looking for a translation of this code to Vanila JS or any JS framework in order to use it in my react app. Currently, I'm using bootstrap's enforceFocus={false}
as a workaround, but I'm losing accessibility for blind people (they can now focus any element that's beneath the modal...) which is far from ideal. Could you maybe transpile this code to Vanila JS?
Hi @obrovacm
I'll transfer this issue to the tinymce/tinymce
repository so the developers can have a look into this issue.
Tyler
Here's a direct conversion to Javascript. The caveat is that it doesn't support Internet Explorer (due to using closest). There is a pollyfill on MDN if you need that ( https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#polyfill )
document.addEventListener('focusin', function(e) {
if (e.target.closest(".tox-tinymce, .tox-tinymce-aux, .moxman-window, .tam-assetmanager-root").length) {
event.stopImmediatePropagation();
}
});
This issue is stale because it has been open 365 days with no activity. Please comment if you wish to keep this issue open or it will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.
I need Vanila JS, React or Angular implementation for event propagation , basically anything that's not JQuery