diff --git a/src/components/void.js b/src/components/void.js index a9a1fd250..e390ea752 100644 --- a/src/components/void.js +++ b/src/components/void.js @@ -67,8 +67,7 @@ class Void extends React.Component { // Make the outer wrapper relative, so the spacer can overlay it. const style = { - position: 'relative', - lineHeight: '0px' + position: 'relative' } return ( @@ -91,11 +90,33 @@ class Void extends React.Component { */ renderSpacer = () => { - const style = { - position: 'relative', - top: '0px', - left: '-9999px', - textIndent: '-9999px', + const { node } = this.props + let style + + if (node.kind == 'block') { + style = IS_FIREFOX + ? { + pointerEvents: 'none', + width: '0px', + height: '0px', + lineHeight: '0px', + visibility: 'hidden' + } + : { + position: 'absolute', + top: '0px', + left: '-9999px', + textIndent: '-9999px' + } + } else { + style = { + position: 'relative', + top: '0px', + left: '-9999px', + height: '0px', + width: '0px', + textIndent: '-9999px', + } } return (