Skip to content

Wrapper.setChecked doesn't work #1071

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

Closed
Saldop opened this issue Dec 18, 2018 · 0 comments
Closed

Wrapper.setChecked doesn't work #1071

Saldop opened this issue Dec 18, 2018 · 0 comments
Labels

Comments

@Saldop
Copy link

Saldop commented Dec 18, 2018

Version

1.0.0-beta.27

Reproduction link

https://codesandbox.io/s/00x1v7krl

Steps to reproduce

  1. Create a wrapper containing only a checkbox
  2. Call setChecked(true) on the wrapper
  3. Check, whether the checked value of the checkbox has changed

What is expected?

The checked value of the checkbox should be true.

What is actually happening?

The checked value of the checkbox remains unchanged.


I think the problem here is, that first

checkboxWrapper.element.checked = true

changes the checked value of the checkbox, then

checkboxWrapper.trigger('click')

changes it back.

Occured in chrome 70, but from the logic of the setChecked method, i assume majority of modern browsers are affected. In PhantomJS this works as expected.

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

No branches or pull requests

2 participants