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

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

Open
latentflip opened this issue Dec 1, 2014 · 0 comments
Labels

Comments

@latentflip
Copy link
Contributor

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.

@bear bear added the bug label Dec 1, 2014
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