Skip to content

rc-trigger Does not work in a Shadow DOM #301

Open
@Jaggler3

Description

@Jaggler3

Found this issue using the Ant Design package and traced it down to this dependency.

Reference: ant-design/ant-design#35897

Reproduce: https://codesandbox.io/s/ant-design-web-component-issues-lx7d2v?file=/index.js

Workaround is to pass this prop:

getDocument={documentElement && (() => documentElement)} // documentElement is a modified shadow-root

documentElement is retrieved using getRootNode() of the trigger element and also needs to add createElement to it because rc-trigger thinks it is a document object.

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