From ecc9202db7e51a301ce13a3604d3e3bb597ab092 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Fri, 29 Jul 2016 12:44:08 -0700 Subject: [PATCH] change placeholder to only render when visible --- lib/components/placeholder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/components/placeholder.js b/lib/components/placeholder.js index 1bcf260dd..3d483e7a5 100644 --- a/lib/components/placeholder.js +++ b/lib/components/placeholder.js @@ -66,6 +66,8 @@ class Placeholder extends React.Component { render = () => { const isVisible = this.isVisible() + if (!isVisible) return null + const { children, className } = this.props let { style } = this.props @@ -76,7 +78,6 @@ class Placeholder extends React.Component { } const styles = { - display: isVisible ? 'block' : 'none', position: 'absolute', top: '0px', right: '0px',