diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-17 16:38:19 -0800 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-17 16:38:19 -0800 |
| commit | 10843071eacf94b237d131a50df9c58352441814 (patch) | |
| tree | 854ed4e91131d5f11c4526c0cd24056adf1de2e3 /src/client/views/nodes/FormattedTextBox.tsx | |
| parent | e553c4ac4785ee1d2c57ed5d5303d6dff26929f9 (diff) | |
| parent | 96ada41d4c3c411be63bd656da65bba7894a4224 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
| -rw-r--r-- | src/client/views/nodes/FormattedTextBox.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx index a298fd6af..b19729811 100644 --- a/src/client/views/nodes/FormattedTextBox.tsx +++ b/src/client/views/nodes/FormattedTextBox.tsx @@ -822,6 +822,7 @@ export class FormattedTextBox extends DocAnnotatableComponent<(FieldViewProps & clipboardTextSerializer: this.clipboardTextSerializer, handlePaste: this.handlePaste, }); + this._editorView.state.schema.Document = this.props.Document; if (startup && this._editorView) { Doc.GetProto(doc).documentText = undefined; this._editorView.dispatch(this._editorView.state.tr.insertText(startup)); @@ -872,7 +873,7 @@ export class FormattedTextBox extends DocAnnotatableComponent<(FieldViewProps & if (this.props.onClick && e.button === 0) { e.preventDefault(); } - if (e.button === 0 && this.props.isSelected(true) && !e.altKey && !e.ctrlKey && !e.metaKey) { + if (e.button === 0 && this.active(true) && !e.altKey && !e.ctrlKey && !e.metaKey) { e.stopPropagation(); } if (e.button === 2 || (e.button === 0 && e.ctrlKey)) { |
