aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorab <abdullah_ahmed@brown.edu>2019-07-08 11:06:24 -0400
committerab <abdullah_ahmed@brown.edu>2019-07-08 11:06:24 -0400
commit7627ed4d04f9bdcc2144c2b82197881e3f097c9a (patch)
tree11aa41011b663f5ab563141d1eac75f3c46d24be /src
parenta674a1f733484a7ae4cdd9e3288451f2eb7d834b (diff)
highlighting and unhighlighting works when you click search item
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 2fdb16cc3..3c40819a8 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -160,7 +160,7 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
}
public unhighlightSearchTerms = () => {
- if (this._editorView) {
+ if (this._editorView && (this._editorView as any).docView) {
const doc = this._editorView.state.doc;
const mark = this._editorView.state.schema.mark(this._editorView.state.schema.marks.search_highlight);
doc.nodesBetween(0, doc.content.size, (node: ProsNode, pos: number, parent: ProsNode, index: number) => {