mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-01 11:12:42 +02:00
fix isNative incorrectly being checked
This commit is contained in:
@@ -86,12 +86,14 @@ class Content extends React.Component {
|
||||
shouldComponentUpdate = (props, state) => {
|
||||
// If the state has been transformed natively, never re-render, or else we
|
||||
// will end up duplicating content.
|
||||
console.log('isNative', props.state.isNative)
|
||||
if (props.state.isNative) return false
|
||||
|
||||
return (
|
||||
props.className != this.props.className ||
|
||||
props.readOnly != this.props.readOnly ||
|
||||
props.spellCheck != this.props.spellCheck ||
|
||||
props.state != this.props.state ||
|
||||
props.style != this.props.style
|
||||
)
|
||||
}
|
||||
@@ -423,6 +425,7 @@ class Content extends React.Component {
|
||||
*/
|
||||
|
||||
onInput = (e) => {
|
||||
if (this.isComposing) return
|
||||
if (isNonEditable(e)) return
|
||||
|
||||
let { state, renderDecorations } = this.props
|
||||
|
Reference in New Issue
Block a user