1
0
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:
Ian Storm Taylor
2016-08-01 12:40:09 -07:00
parent 145b039616
commit 40598d7198

View File

@@ -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