From 75f0080b246eeb873189d11d242dc039127375c0 Mon Sep 17 00:00:00 2001 From: Chris Drackett Date: Wed, 3 Feb 2016 14:50:33 -0800 Subject: [PATCH] Update to support horizontal overflow This is useful for `textarea` elements that contain code, but with line lengths greater than the `textarea`'s width --- src/calculateNodeHeight.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/calculateNodeHeight.js b/src/calculateNodeHeight.js index 5c90f6e5..b3486b39 100644 --- a/src/calculateNodeHeight.js +++ b/src/calculateNodeHeight.js @@ -7,7 +7,7 @@ const HIDDEN_TEXTAREA_STYLE = ` max-height:none !important; height:0 !important; visibility:hidden !important; - overflow:hidden !important; + overflow-y:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; @@ -28,7 +28,10 @@ const SIZING_STYLE = [ 'padding-left', 'padding-right', 'border-width', - 'box-sizing' + 'box-sizing', + 'word-wrap', + 'overflow-x', + 'white-space' ]; let computedStyleCache = {};