aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx9
1 files changed, 5 insertions, 4 deletions
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;