-
DescriptionThe issue doesn't seem to affect the behavior of Plate Editor in the browser, but became visible when writing unit tests. It seems two DOM elements are created for a single floating link. This is both is using headless mode, or examples. For example the https://platejs.org/ itself has it Steps to ReproduceFunding
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
afaik these are not the same elements |
Beta Was this translation helpful? Give feedback.
-
Yeah, my bad, it seems two floating root containers are expected. It was a bit confusing that the editing form might show up in either insert or view-edit root element. So we should account for this in testing. The original layout code clearly describes the conditions https://github.com/udecode/plate/blob/main/templates/plate-playground-template/src/components/plate-ui/link-floating-toolbar.tsx#L101 |
Beta Was this translation helpful? Give feedback.
Yeah, my bad, it seems two floating root containers are expected. It was a bit confusing that the editing form might show up in either insert or view-edit root element. So we should account for this in testing.
The original layout code clearly describes the conditions https://github.com/udecode/plate/blob/main/templates/plate-playground-template/src/components/plate-ui/link-floating-toolbar.tsx#L101