1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-20 15:14:38 +01:00

Do not process onInput events when selection is lost

Resolves an issue where `this.getPoint(anchorNode, anchorOffset)` throws an error if a key event is triggered although not in focus
This commit is contained in:
Aeneas 2016-11-14 12:55:55 +01:00 committed by GitHub
parent d4eb53fd6f
commit b201c6dc13

View File

@ -418,6 +418,7 @@ class Content extends React.Component {
onInput = (e) => {
if (this.tmp.isRendering) return
if (this.tmp.isComposing) return
if (this.props.state.isBlurred) return
if (isNonEditable(e)) return
debug('onInput')