Disable the hidden input when the model is readOnly or keyboard disabled

This commit is contained in:
Ash Wilson
2018-04-12 11:50:53 -04:00
parent 0a48c3cece
commit 6ee477a329

View File

@@ -2965,11 +2965,11 @@ class TextEditorComponent {
}
setInputEnabled (inputEnabled) {
this.props.model.update({readOnly: !inputEnabled})
this.props.model.update({enableKeyboardInput: inputEnabled})
}
isInputEnabled (inputEnabled) {
return !this.props.model.isReadOnly()
isInputEnabled () {
return !this.props.model.isReadOnly() && this.props.model.isKeyboardInputEnabled()
}
getHiddenInput () {