This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
this.root_ is not available in getDefaultFoundation() #242
Comments
Ah, you're totally right; super subtle bug. We will fix it, add a regression test, and add a comment as to why the code needs to be structured that way. |
PR for this is coming today. However FYI as a tip when writing your own foundations, you usually want to wait to call all adapter methods until |
traviskaufman
added a commit
that referenced
this issue
Feb 8, 2017
traviskaufman
added a commit
that referenced
this issue
Feb 8, 2017
traviskaufman
added a commit
that referenced
this issue
Feb 10, 2017
Good point Travis. Thank you very much! |
cristobalchao
pushed a commit
that referenced
this issue
Feb 24, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello!
Since this commit this.root_ is not accessible anymore from the getDefaultFoundation() hook of child classes of MDCComponent. This is an issue when authoring custom vanilla components since the majority of adapter APIs need a reference to the root element.
Steps to reproduce
What MDC-Web Version are you using?
"@material/base": "0.1.1"
(0.1.0 works.)
What is the expected behavior?
The console should output a reference to the component DOMElement.
What is the actual behavior?
The console outputs undefined.
The text was updated successfully, but these errors were encountered: