jodit icon indicating copy to clipboard operation
jodit copied to clipboard

Dialogs don't work inside Shadow DOM

Open eemorozov opened this issue 2 years ago • 0 comments

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.

eemorozov avatar Jul 12 '22 23:07 eemorozov