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

Checkbox mouse click does not clear invalid state #5836

Closed
smozely opened this issue Feb 8, 2024 · 2 comments
Closed

Checkbox mouse click does not clear invalid state #5836

smozely opened this issue Feb 8, 2024 · 2 comments

Comments

@smozely
Copy link

smozely commented Feb 8, 2024

Provide a general summary of the issue here

When the Checkbox in in Invalid state, using the mouse to select the checkbox will not clear the invalid state, while using the keyboard will.

This then prevents the form being re-submitted.

🤔 Expected Behavior?

The invalid state from the checkbox should be cleared when selected with the mouse

😯 Current Behavior

The invalid state is not being cleared which looks wrong. Also because of the way we are using custom validation its preventing the form submit.

💁 Possible Solution

It should work the same as with the keyboard

🔦 Context

Using a checkbox for a "Accept Terms of use" field on a registration form. So wanting to force the Checkbox to be checked before proceeding.

🖥️ Steps to Reproduce

Can see it here,

Sandbox

Styles are a bit iffy but
1, Click Submit - Will show that the checkbox unselected and isInvalid
2, Click the "Click Me" with the mouse - Will show that the checkbox selected and isInvalid
3, Use the keybord to change the "Click Me" - Will show the checkbox select and valid

In this example, you'll be able to submit the form even at step 2. In our case we can't because we are using custom validation ... but pretty sure resolving this issue will also fix our case

Version

1.0.1

What browsers are you seeing the problem on?

Firefox, Chrome

If other, please specify.

No response

What operating system are you using?

Mac

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@snowystinger
Copy link
Member

I think this is a dupe of #5693

@smozely
Copy link
Author

smozely commented Feb 19, 2024

Ah thanks @snowystinger yeah I guess I my searching-fu failed there (looking for Checkbox rather than Checkbox group)

closing as dup

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

No branches or pull requests

2 participants