Skip to content

Bug: $getSelection() does not work inside the shadow DOM. #6709

@ying-bin

Description

@ying-bin

Lexical version:

latest

Steps To Reproduce

When I use Lexical inside a shadow DOM, I find that $getSelection() does not work, and I am unable to retrieve the selected content.

Link to code example:

https://stackblitz.com/edit/facebook-lexical-j9ccrm

The current behavior

$getSelection() does not work inside the shadow DOM.

The expected behavior

To be able to use FloatingTextFormatToolbarPlugin inside the shadow DOM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions