Skip to content

Commit b2461ea

Browse files
committed
Revert #58.
1 parent d5e06ce commit b2461ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/calculateNodeHeight.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function calculateNodeHeight(uiTextNode,
5454
// text-lines will not calculated properly as the shadow will technically be
5555
// narrower for content
5656
hiddenTextarea.setAttribute('style', sizingStyle + ';' + HIDDEN_TEXTAREA_STYLE);
57-
hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
57+
hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || 'x';
5858

5959
let minHeight = -Infinity;
6060
let maxHeight = Infinity;
@@ -70,7 +70,7 @@ export default function calculateNodeHeight(uiTextNode,
7070

7171
if (minRows !== null || maxRows !== null) {
7272
// measure height of a textarea with a single row
73-
hiddenTextarea.value = '';
73+
hiddenTextarea.value = 'x';
7474
let singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
7575
if (minRows !== null) {
7676
minHeight = singleRowHeight * minRows;

0 commit comments

Comments
 (0)