diff options
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/FormattedTextBox.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx index ede0facd8..d9a781c9c 100644 --- a/src/client/views/nodes/FormattedTextBox.tsx +++ b/src/client/views/nodes/FormattedTextBox.tsx @@ -141,7 +141,6 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe this.props.Document.guid = undefined; this.props.Document.linkHref = undefined; - console.log('formattextbox', this.props.Document[Id]); reaction( () => StrCast(this.props.Document.guid), async (guid) => { @@ -159,9 +158,11 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe } else { tr = editor.state.tr.setSelection(TextSelection.near(editor.state.doc.resolve(ret.start))); } + editor.focus(); editor.dispatch(tr.scrollIntoView()); - editor.dispatch(tr.scrollIntoView()); // bcz: sometimes selection doesn't fully scroll into view on smaller text boxes <5 lines visibility -- hopefully avoidable by ppl just not using small boxes...? + // editor.dispatch(tr.scrollIntoView()); // bcz: sometimes selection doesn't fully scroll into view on smaller text boxes <5 lines visibility -- hopefully avoidable by ppl just not using small boxes...? + this.props.Document.guid = undefined; this.props.Document.linkHref = undefined; } @@ -192,7 +193,6 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe marks[linkIndex].attrs.guid = guid; return node; } - console.log('href was and is ', href, marks[linkIndex].attrs.href); } return undefined; } @@ -815,11 +815,6 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe if (jumpToDoc) { if (DocumentManager.Instance.getDocumentView(jumpToDoc)) { - // if !guid, then generate guid and apply to full doc - if (!guid) { - console.log('making new guid!'); // hehheehhehehe - linkDoc.guid = Utils.GenerateGuid(); - } DocumentManager.Instance.jumpToDocument(jumpToDoc, e.altKey, undefined, undefined, NumCast((jumpToDoc === linkDoc.anchor2 ? linkDoc.anchor2Page : linkDoc.anchor1Page))); return; } |