mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-19 05:31:56 +02: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:
@@ -418,6 +418,7 @@ class Content extends React.Component {
|
|||||||
onInput = (e) => {
|
onInput = (e) => {
|
||||||
if (this.tmp.isRendering) return
|
if (this.tmp.isRendering) return
|
||||||
if (this.tmp.isComposing) return
|
if (this.tmp.isComposing) return
|
||||||
|
if (this.props.state.isBlurred) return
|
||||||
if (isNonEditable(e)) return
|
if (isNonEditable(e)) return
|
||||||
debug('onInput')
|
debug('onInput')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user