jodit
jodit copied to clipboard
Dialogs don't work inside Shadow DOM
Jodit Version: 3.18.9
Browser: Chrome/FF OS: Windows Is React App: True
Code CodeSandbox
Expected behavior: If you try to copy styled text from some site and paste it in editor, "Paste as HTML" Dialog should be shown inside Shadow DOM.
Actual behavior: Dialog is rendered inside body (instead of Shadow DOM root) without styles. The reason is in Dialog "destination" https://github.com/xdan/jodit/blob/5278d95338da6c67807f4dae8a1dc53d94d96eeb/src/modules/dialog/dialog.ts#L99 I made CodeSandbox example where "destination" property has been patched with shadow root - it's worked as expected. So we should consider there "shadowRoot" option from config.