moveable icon indicating copy to clipboard operation
moveable copied to clipboard

moveable-react not working properly when application runs in shadow dom

Open volkansamurai opened this issue 3 years ago • 2 comments

Environments

  • Framework name: React
  • Framework version: 16.8.6
  • Moveable Component version: 0.38.4
  • Testable Address: https://codesandbox.io/s/render-in-shadow-dom-with-ssr-and-styled-components-forked-klkm7v?file=/src/App.js
  • Test case: Open the test link and press delete button.

Description

When application runs in shadow dom, if you change render status of the component. It throws an error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

The source of the problem is here, if you check the 32. line of the code, styledElement not included in el:

Screen Shot 2022-09-01 at 15 18 19

We use shadow dom at the top levels of our app, what is the proper way to use react-moveable in shadow dom?

volkansamurai avatar Sep 01 '22 12:09 volkansamurai

@volkansamurai

okay. i'll fix it.

daybrush avatar Sep 08 '22 14:09 daybrush

@volkansamurai

moveable's new version is released. Check it again.

daybrush avatar Sep 15 '22 18:09 daybrush