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

Upgrade problem in dynamically created elements #1498

Merged
merged 1 commit into from
Aug 31, 2015
Merged

Conversation

dopic
Copy link
Contributor

@dopic dopic commented Aug 29, 2015

Change in the function upgradeElementsInternal to enable the upgrade of child elements created by parent element's upgrade, like RippleContainerElement in Checkbox. The problem was happening when the element was created dynamically.

…f child elements created by parent element's upgrade, like RippleContainerElement in Checkbox. The problem was happening when the element was created dynamically.
@dopic dopic closed this Aug 29, 2015
@dopic dopic reopened this Aug 29, 2015
@surma
Copy link
Contributor

surma commented Aug 29, 2015

Hey @dopic! Thanks for coming up with an implementation straight away.

Before I take a closer look: I was under the impression that the scenario you are describing was working with our implementation. Could you do us a favor whip up a CodePen showing a setup where creating an element dynamically wasn’t working as expected?

@dopic
Copy link
Contributor Author

dopic commented Aug 29, 2015

Hi @surma ! Thanks for the reply!

Sure, here is the link: http://codepen.io/dopic/pen/rOBPXo
Take a look at the rippleContainerElement created by the upgrade of Checkbox. It doesn't upgrade.

@surma
Copy link
Contributor

surma commented Aug 29, 2015

@dopic Thank you! This is something that should be working, but obviously isn’t 😄

Looping in @Garbee and @jasonmayes to take a look at your code

@Garbee
Copy link
Collaborator

Garbee commented Aug 29, 2015

I'll take a closer look Monday when I have time. Weary about changing this
behavior though, may cause user code built to manage this situation to
break if not properly written.
On Aug 29, 2015 7:51 AM, "Surma" notifications@github.com wrote:

@dopic https://github.com/dopic Thank you! This is something that
should be working, but obviously isn’t [image: 😄]

Looping in @Garbee https://github.com/Garbee and @jasonmayes
https://github.com/jasonmayes to take a look at your code


Reply to this email directly or view it on GitHub
#1498 (comment)
.

@Garbee
Copy link
Collaborator

Garbee commented Aug 31, 2015

I'd say go ahead and merge. If someone coded a workaround to this then, sorry it may break. But it is a genuine bug-fix here.

@surma
Copy link
Contributor

surma commented Aug 31, 2015

Thanks, @Garbee!

Merging.

surma added a commit that referenced this pull request Aug 31, 2015
Upgrade problem in dynamically created elements
@surma surma merged commit 3b14426 into google:master Aug 31, 2015
@surma
Copy link
Contributor

surma commented Aug 31, 2015

Cherry-picked to commit to mdl-1.0 as well

@dopic
Copy link
Contributor Author

dopic commented Aug 31, 2015

Thanks @Garbee and @surma!

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

Successfully merging this pull request may close these issues.

4 participants