Skip to content

Wrapper.setChecked doesn't work #1071

Closed
@Saldop

Description

@Saldop

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions