Skip to content

Firefox: userEvent.click does not submit forms #1075

Open
@anilanar

Description

@anilanar

Reproduction example

https://codesandbox.io/s/nervous-microservice-nmm3h7?file=/src/index.js

Prerequisites

  1. Use Firefox, not jsdom.
  2. Render a form with an onSubmit handler and a button inside the form such as <button type="submit" />.
  3. Use userEvent.click to click the button in the form.

Expected behavior

Form's onSubmit handler should trigger.

Actual behavior

Form's onSubmit handler does not trigger.

User-event version

14.4.3

Environment

Firefox 106.0.2 (64-bit) Linux

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds investigationSomeone has to do research on this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions