Skip to content

In a select element, the onChange event fires even when selecting the currently chosen option #19494

Description

@YishaiBerg

Current behavior

In a select element, the onChange event fires even when clicking on the option which is already selected. This behavior is not consistent with what actually happens in browsers (I tested this only on Chrome).

Desired behavior

In a select element, the onChange event should only fire when the value of the select element actually changes. When clicking on an option that is already selected, it should not fire.

Test code to reproduce

Here is a repo with a failing test. The code for the AUT can be found here.

Cypress Version

9.2.0

Other

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pkg/driverThis is due to an issue in the packages/driver directory

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions