Skip to content

Controlled input loses cursor under ShadowRoot in React 18 #597

@kimo-k

Description

@kimo-k

This controlled-input cursor bug appears when I try to use the new react.dom.client API to render an :input component within a shadow root. The text cursor skips to the end every time I insert a character.

The same component works fine with the react.dom API.

Is this expected, and is there anything I can do? I'm reticent to go with the react-native workaround, since my codebase is pretty large, with everything inside a shadow root (i.e. re-frame-10x).

Minimal repro: master...kimo-k:reagent:shadow-root-controlled-input-bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions