When switches, radio buttons and checkboxes are upgraded using the componentHandler, the internal __ripple-container is not upgraded and the ripple is not effected when the toggle is clicked. There is a copdepen here that puts statically-created and dynamically-created toggles side by side.
With the statically-created switch, the mdl-switch__ripple-container looks like this:
The dynamically-created switch's label contains this attribute:
data-upgraded=",MaterialSwitch,MaterialRipple"
suggesting that the switch component has been upgraded for the ripple effect, but without the internal mdl-switch__ripple-container being upgraded, too, there'll be no ripple effect.
Note that explicitly upgrading the mdl-switch__ripple-container using the componentHandler results in the expected behaviour, but that should not be necessary: the componentHandler should fully upgrade the component.
When switches, radio buttons and checkboxes are upgraded using the
componentHandler
, the internal__ripple-container
is not upgraded and the ripple is not effected when the toggle is clicked. There is a copdepen here that puts statically-created and dynamically-created toggles side by side.With the statically-created switch, the
mdl-switch__ripple-container
looks like this:<span class="mdl-switch__ripple-container mdl-js-ripple-effect mdl-ripple--center" data-upgraded=",MaterialRipple"><span class="mdl-ripple is-animating" style="width: 137.765px; height: 137.765px; transform: translate(-50%, -50%) translate(24px, 24px);"></span></span>
And with the dynamically-created switch, like this:
<span class="mdl-switch__ripple-container mdl-js-ripple-effect mdl-ripple--center"><span class="mdl-ripple"></span></span>
The dynamically-created switch's
label
contains this attribute:data-upgraded=",MaterialSwitch,MaterialRipple"
suggesting that the switch component has been upgraded for the ripple effect, but without the internal
mdl-switch__ripple-container
being upgraded, too, there'll be no ripple effect.Note that explicitly upgrading the
mdl-switch__ripple-container
using thecomponentHandler
results in the expected behaviour, but that should not be necessary: thecomponentHandler
should fully upgrade the component.