Skip to content

Checkbox: Object.assign on read-only Event.target crashes onCheckedChange #409

@ilicfilip

Description

@ilicfilip

Description

The Checkbox component crashes when clicked due to Object.assign(event, { target: ... }) in the onCheckedChange handler. Event.target is a read-only getter property and cannot be set via Object.assign.

Error

Uncaught TypeError: Cannot set property target of #<Event> which has only a getter
    at Object.assign (<anonymous>)
    at Object.onCheckedChange (@cloudflare_kumo.js:4043:32)

Steps to Reproduce

  1. Render a <Checkbox> component
  2. Click on it
  3. The onCheckedChange handler throws

Environment

  • @cloudflare/kumo v1.18.0
  • React 19.2.4
  • Chrome (latest)

Expected Behavior

Checkbox should toggle without errors.

Actual Behavior

Throws TypeError: Cannot set property target of #<Event> which has only a getter on every click. The checkbox state does not change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions