From 75fa8e7e798566962d88fc3012c41c3179580e39 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 10 Sep 2020 10:59:58 -0400
Subject: fixed following links on text hyperlink to use same code as linkMenu.
  fixed hyperlink delete button

---
 .../collectionFreeForm/CollectionFreeFormLinkView.tsx            | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
index 8bc3cdf1b..79a540210 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
@@ -108,18 +108,19 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo
     }
 
     visibleY = (el: any) => {
-        var rect = el.getBoundingClientRect(), top = rect.top, height = rect.height,
-            el = el.parentNode;
+        let rect = el.getBoundingClientRect();
+        const top = rect.top, height = rect.height;
+        var el = el.parentNode;
         do {
             rect = el.getBoundingClientRect();
             if (top <= rect.bottom === false && getComputedStyle(el).overflow === "hidden") return rect.bottom;
             // Check if the element is out of view due to a container scrolling
             if ((top + height) <= rect.top && getComputedStyle(el).overflow === "hidden") return rect.top;
             el = el.parentNode;
-        } while (el != document.body);
+        } while (el !== document.body);
         // Check its within the document viewport
         return top; //top <= document.documentElement.clientHeight && getComputedStyle(document.documentElement).overflow === "hidden";
-    };
+    }
 
     @computed get renderData() {
         this._start;
-- 
cgit v1.2.3-70-g09d2

