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 @@ -164,7 +164,7 @@ export class MdAutosize implements OnInit {
164
164
}
165
165
166
166
private _getLineHeight ( ) : number {
167
- const el : HTMLElement = this . _elRef . nativeElement ;
167
+ const el : HTMLTextAreaElement = this . _elRef . nativeElement ;
168
168
169
169
// get the actual computed styles for the element
170
170
const computedStyles = window . getComputedStyle ( el ) ;
@@ -176,7 +176,7 @@ export class MdAutosize implements OnInit {
176
176
}
177
177
178
178
// create temporary element
179
- const tempEl = document . createElement ( el . nodeName ) ;
179
+ const tempEl = < HTMLTextAreaElement > document . createElement ( el . nodeName ) ;
180
180
181
181
// reset styling, visually hiden the element
182
182
// and set its font styles to match the ones of our textarea
@@ -194,7 +194,7 @@ export class MdAutosize implements OnInit {
194
194
) ;
195
195
196
196
// fill in one row
197
- tempEl . innerHTML = '-' ;
197
+ tempEl . value = '-' ;
198
198
199
199
// append to parent element to correctly inherit same values
200
200
// as the actual textarea
You can’t perform that action at this time.
0 commit comments