From 9caef373ab0563d4008488fabefa644360d2ecd9 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 20 May 2024 16:47:14 -0400
Subject: restored old style of flashcards for now.

---
 src/client/views/nodes/ComparisonBox.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/client/views/nodes/ComparisonBox.tsx')

diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index 1bb6157b0..adb380f12 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -189,7 +189,8 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
     remDoc2 = (docs: Doc | Doc[]) => toList(docs).reduce((res, doc) => res && this.remDoc(doc, this.fieldKey + '_2'), true);
 
     /**
-     * Tests for whether a comparison box slot (ie, before or after) has renderable text content
+     * Tests for whether a comparison box slot (ie, before or after) has renderable text content.
+     * If it does, render a FormattedTextBox for that slot that references the comparisonBox's slot field
      * @param whichSlot field key for start or end slot
      * @returns a JSX layout string if a text field is found, othwerise undefined
      */
@@ -316,8 +317,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
         const displayDoc = (whichSlot: string) => {
             const whichDoc = DocCast(this.dataDoc[whichSlot]);
             const targetDoc = DocCast(whichDoc?.annotationOn, whichDoc);
-            // if there is no Doc in the first comparison slot, but the comparison box's fieldKey slot has a RichTextField, then render a text box to show the contents of the document's field key slot
-            const layoutString = !targetDoc && whichSlot.endsWith('1') && this.Document[this.fieldKey] instanceof RichTextField ? FormattedTextBox.LayoutString(this.fieldKey) : undefined;
+            const layoutString = targetDoc ? '' : this.testForTextFields(whichSlot);
 
             return targetDoc || layoutString ? (
                 <>
-- 
cgit v1.2.3-70-g09d2

