File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ export class MdAutosize implements OnInit {
160
160
}
161
161
162
162
private _getLineHeight ( ) : number {
163
- const el : HTMLElement = this . _elRef . nativeElement ;
163
+ const el : HTMLTextAreaElement = this . _elRef . nativeElement ;
164
164
165
165
// get the actual computed styles for the element
166
166
const computedStyles = window . getComputedStyle ( el ) ;
@@ -172,7 +172,7 @@ export class MdAutosize implements OnInit {
172
172
}
173
173
174
174
// create temporary element
175
- const tempEl = document . createElement ( el . nodeName ) ;
175
+ const tempEl = < HTMLTextAreaElement > document . createElement ( el . nodeName ) ;
176
176
177
177
// reset styling, visually hiden the element
178
178
// and set its font styles to match the ones of our textarea
@@ -190,7 +190,7 @@ export class MdAutosize implements OnInit {
190
190
) ;
191
191
192
192
// fill in one row
193
- tempEl . innerHTML = '-' ;
193
+ tempEl . value = '-' ;
194
194
195
195
// append to parent element to correctly inherit same values
196
196
// as the actual textarea
You can’t perform that action at this time.
0 commit comments