Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-tabs: Cannot read property 'offsetHeight' of undefined at updateHeightFromContent() #2402

Closed
ookadoo opened this issue Apr 17, 2015 · 3 comments
Assignees
Milestone

Comments

@ookadoo
Copy link

ookadoo commented Apr 17, 2015

I saw this issue from earlier today, but the resolution for that issue did not work for me. See my plunkr below. I'm assuming I'm doing something wrong.

My tabs are not drawn until there is data and that will come in through a rest call. I simulated that by a $timeout in the plunkr and was able to recreate. I think that is part of the problem, at the time of updateHeightFromContent() on line 13089 of 0.9RC1 the elements.contents is empty.

Any suggestions are welcome. Sorry if I'm missing something obvious.

http://plnkr.co/edit/Cmh46zfdn7zgWJlWbczo?p=preview

@ookadoo ookadoo changed the title Cannot read property 'offsetHeight' of undefined at updateHeightFromContent() md-tabs: Cannot read property 'offsetHeight' of undefined at updateHeightFromContent() Apr 17, 2015
@vacarsu
Copy link

vacarsu commented Apr 18, 2015

You're using a repeater to dynamically load the tabs in, adding a time out will cause the tabs to not load because their is nothing to load until the timeout finishes. This seems normal?

@ookadoo
Copy link
Author

ookadoo commented Apr 18, 2015

vacarsu, I think this is a valid usage scenario. If you open the console you'll see the js errors that are generated. They match the title of this issue.

@robertmesserle
Copy link
Contributor

@Jbrown0 I agree, this is a completely valid use-case. Adding a fix right now.

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

No branches or pull requests

4 participants