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

setting attribute "style" to null breaks this attribute #3606

Closed
firlaj opened this issue Apr 7, 2015 · 1 comment · Fixed by #3614
Closed

setting attribute "style" to null breaks this attribute #3606

firlaj opened this issue Apr 7, 2015 · 1 comment · Fixed by #3614
Assignees

Comments

@firlaj
Copy link

firlaj commented Apr 7, 2015

When I assign null to style attribute to reset it, it works... but only once. Any following changes of this value do nothing. Here's a fiddle demonstrating this - try to push the button several times:
http://jsfiddle.net/bqnhkwju/

This seems like a strange behaviour to me - I wouldn't be surprised, if my first attempt to set style=null failed, but it doesn't and it silently breaks the style attribute.

@kassens kassens self-assigned this Apr 7, 2015
kassens added a commit to kassens/react that referenced this issue Apr 7, 2015
When the style property existed, but was set to null, `this._previousStyleCopy`
was not set back to `null` causing an old value to persist. This broke setting
the style to `null` the next time.

Fixes facebook#3606.
@kassens
Copy link
Member

kassens commented Apr 7, 2015

Thanks @firlaj, I was able to reproduce this.

@zpao zpao closed this as completed in #3614 Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants