diff --git a/lib/components/void.js b/lib/components/void.js index 43d63ec0e..2dc05bfbd 100644 --- a/lib/components/void.js +++ b/lib/components/void.js @@ -5,6 +5,7 @@ import OffsetKey from '../utils/offset-key' import React from 'react' import ReactDOM from 'react-dom' import keycode from 'keycode' +import { IS_FIREFOX } from '../utils/environment' /** * Void. @@ -109,15 +110,26 @@ class Void extends React.Component { */ renderSpacer = () => { - const style = { - position: 'absolute', - top: '0px', - left: '-9999px', - textIndent: '-9999px' - } + // COMPAT: In Firefox, if the is positioned absolutely, it won't + // receive the cursor properly when navigating via arrow keys. + const style = IS_FIREFOX + ? { + pointerEvents: 'none', + width: '0px', + height: '0px', + lineHeight: '0px', + visibility: 'hidden' + } + : { + pointerEvents: 'none', + position: 'absolute', + top: '0px', + left: '-9999px', + textIndent: '-9999px' + } return ( - {this.renderLeaf()} + {this.renderLeaf()} ) }