Skip to content

Bug: validateDOMNesting needs to be updated for new customisable form widgets #33609

Open
@Wiktor102

Description

@Wiktor102

React version: 19.1.0

Steps To Reproduce

  1. Implement a select box with the new styling API. For example, follow the MDN tutorial, specifically this point.

Link to code example: (Pure html/css reproduction of <button> working inside of <select>): https://codepen.io/web-dot-dev/pen/gbOKyRZ

The current behavior

An error in the console:

In HTML, <button> cannot be a child of <select>.
This will cause a hydration error.

The expected behavior

No error.

Additional context

The spec

Not all relevant specs were updated. While the CSS spec is ready, HTML isn't. Issues and PRs related to this are tracked here.

Loosely related

I also opened an issue in @types/react for adding a definition of a new element related to this new customisable select: DefinitelyTyped/DefinitelyTyped#73079

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions