diff --git a/packages/slate-react/src/components/void.js b/packages/slate-react/src/components/void.js index 3eece16df..24d04fe15 100644 --- a/packages/slate-react/src/components/void.js +++ b/packages/slate-react/src/components/void.js @@ -128,20 +128,13 @@ class Void extends React.Component { const Tag = node.kind == 'block' ? 'div' : 'span' let style - if (!readOnly && node.kind == 'block') { + if (!readOnly) { style = { - display: 'block', height: '0', color: 'transparent' } } - if (!readOnly && node.kind == 'inline') { - style = { - color: 'transparent' - } - } - this.debug('render', { props }) return ( diff --git a/packages/slate-react/test/rendering/fixtures/custom-block-void.js b/packages/slate-react/test/rendering/fixtures/custom-block-void.js index d67ad7cc3..3c684f90e 100644 --- a/packages/slate-react/test/rendering/fixtures/custom-block-void.js +++ b/packages/slate-react/test/rendering/fixtures/custom-block-void.js @@ -24,9 +24,11 @@ export const state = ( export const output = `
- - - +
+ + + +
diff --git a/packages/slate-react/test/rendering/fixtures/custom-inline-void.js b/packages/slate-react/test/rendering/fixtures/custom-inline-void.js index 1251c7e31..d1627c4a2 100644 --- a/packages/slate-react/test/rendering/fixtures/custom-inline-void.js +++ b/packages/slate-react/test/rendering/fixtures/custom-inline-void.js @@ -32,8 +32,10 @@ export const output = ` - - + + + +