google / google/material-design-lite

componentHandler.upgrade() doesn't work after AJAX request delay. What to do?

Open
#5,210 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
32.2k
Forks
4.9k
PR merge metrics
No merged PRs in 30d

Description

> What MDL Version are you using? (please be specific, e.g. _major.minor.patch_)
V1.3.0

> What browser(s) is this bug affecting (including version)?
Firefox Quantum 59.0.3

> What OS (and version) are you using?
Windows 10

> What are the steps to reproduce the bug? Can you create a plunker/codepen/jsfiddle which reproduces it?
Try to create dynamic tabs after an AJAX request. On my jsfiddle I used setTimeout to recreate the delay it takes for the request to happend. This was enough to break the upgrade.
https://jsfiddle.net/Lj05dreq/3/

> What is the expected behavior?
The new tab should behave exactly like a static-created tab. The componentHandler should work his magic as described on the MDL Getting Started.

> What is the actual behavior?
Nothing happens. The appended element doesnt have any behaviour.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.