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

md-input-container with initially hidden <textarea> is permanently set to height = 0 #1356

Closed
jelbourn opened this issue Jan 31, 2015 · 3 comments
Assignees
Milestone

Comments

@jelbourn
Copy link
Member

http://jsbin.com/kabozo/2/edit?html,output

When the setupTextarea() function in input.js runs on a <textarea> that is hidden, the height calculation results in zero and is not run again until some text is entered into the input.

@mckenzielong
Copy link
Contributor

would it be good enough to just add check for height at the end of growTextarea?

if (height > 0) 
   node.style.height = height + 'px';

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

@wuv1982
Copy link

wuv1982 commented Feb 5, 2015

i have the same problem.
but the reason i think is that i used $mdModal , it may directive the <textarea> before it shows.
so both of the offsetHeight and scrollHeight are 0.

@WhiteAbeLincoln
Copy link

I am also getting this problem. It occurs when the textarea is on an md-tab. The textarea size is fixed once text is entered.

@ThomasBurleson ThomasBurleson modified the milestone: 0.8.0 Feb 17, 2015
@ThomasBurleson ThomasBurleson self-assigned this Feb 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants