Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent selecting an option in a disabled fieldset #15682

Merged
merged 9 commits into from
Apr 14, 2021

Conversation

herecydev
Copy link
Contributor

@herecydev herecydev commented Mar 27, 2021

Closes #5951

User facing changelog

We now throw an error when attempting to .select() an <option> within a disabled <fieldset>. Fixes #5951.

Additional details

Uses getActiveElByDocument to check whether the select field still has focus when clicked.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 27, 2021

Thanks for taking the time to open a PR!

@CLAassistant
Copy link

CLAassistant commented Mar 27, 2021

CLA assistant check
All committers have signed the CLA.

@herecydev herecydev changed the title Check for disabled fieldset Prevent selecting an option in a disabled fieldset Mar 27, 2021
@herecydev herecydev changed the title Prevent selecting an option in a disabled fieldset fix: Prevent selecting an option in a disabled fieldset Mar 27, 2021
@jennifer-shehane jennifer-shehane requested review from jennifer-shehane and removed request for jennifer-shehane March 29, 2021 19:15
@herecydev herecydev requested a review from a team as a code owner April 1, 2021 13:20
@herecydev herecydev requested review from chrisbreiding and kuceb and removed request for a team April 1, 2021 13:20
Copy link
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress should not allow selecting a disabled option within a disabled fieldset
3 participants