aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-09-15 16:08:21 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-09-15 16:08:21 -0400
commitc453ef0f405125aa0660fb469e2488a75d8dfe54 (patch)
tree4a9b534b6b71fd39324676cdc2cf5a2fd625bcaf /src/client/views/nodes/FormattedTextBox.tsx
parent8c0643bab365b58af25101345b209bacc49a955b (diff)
self heal
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx11
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;
}