Skip to content

Changing a property bound to a checked property of a checkbox within an event handler can break. #32

@latentflip

Description

@latentflip

If e.preventDefault() is called in a checkbox click handler, and then a property is changed which is bound to a booleanAttribute the binding doesn't work. This is because e.preventDefault will revert the change.

Proposed fix is to wrap:

https://github.com/AmpersandJS/ampersand-dom-bindings/blob/master/ampersand-dom-bindings.js#L140

in a setTimeout 0 if we're changing the checked attribute.

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