WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Shadow DOM - Drag-and-drop text throws error #5749

@Hentuloo

Description

@Hentuloo

Upon trying to drag and drop the text, the following error appears in the console:
Error: Cannot resolve a Slate point from DOM point: [object HTMLDivElement],0
Additionally, the text is not moved to the new location.

Screencastfrom2024-10-2020-38-28-ezgif com-video-to-gif-converter

This issue can be reproduced on the official Slate website:: https://www.slatejs.org/examples/shadow-dom

Steps to reproduce:

  1. Render a Slate editor inside a Shadow DOM.
  2. Select a portion of text.
  3. Attempt to drag and drop the selected text into a different paragraph.

Environment:
System: Ubuntu
Browser: Chrome, Version 125.0.6422.141 (Official Build) (64-bit)

Context:
In my case, I need to use a Shadow DOM because I am developing a Chrome extension that will be injected into various websites. The Shadow DOM allows me to create an isolated environment where the editor is unaffected by the surrounding page's styles or scripts, ensuring it functions independently. This is crucial for maintaining consistent and predictable behavior across different host pages.

Thank you for your help and suggestions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions