diff options
author | madelinegr <mgriswold99@gmail.com> | 2019-03-11 18:15:18 -0400 |
---|---|---|
committer | madelinegr <mgriswold99@gmail.com> | 2019-03-11 18:15:18 -0400 |
commit | e502c8fd15951e8b724ec98bef32294e4a6faa5f (patch) | |
tree | 8cfb34fcddec1115aade0c718c37819fce0a9e2a /src/client/views/nodes/FormattedTextBox.tsx | |
parent | 0692b142d84bf7a921b53581f28840260254724d (diff) | |
parent | 618e66a5a070f1aac9224bd3f44b76a5ac314bfa (diff) |
mer con
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/FormattedTextBox.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx index a6cee9957..ad7ddf37a 100644 --- a/src/client/views/nodes/FormattedTextBox.tsx +++ b/src/client/views/nodes/FormattedTextBox.tsx @@ -69,7 +69,7 @@ export class FormattedTextBox extends React.Component<FieldViewProps> { }; let field = this.props.doc.GetT(this.props.fieldKey, RichTextField); - if (field && field != FieldWaiting) { + if (field && field != FieldWaiting && field.Data) { state = EditorState.fromJSON(config, JSON.parse(field.Data)); } else { state = EditorState.create(config); @@ -151,8 +151,12 @@ export class FormattedTextBox extends React.Component<FieldViewProps> { }) } + onKeyPress(e: React.KeyboardEvent) { + e.stopPropagation(); + } render() { return (<div className="formattedTextBox-cont" + onKeyPress={this.onKeyPress} onPointerDown={this.onPointerDown} onContextMenu={this.specificContextMenu} onWheel={this.onPointerWheel} |