From 6ca8c250de45f1edabdf01d054d73b12d9fb791b Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 20 Sep 2022 11:34:38 -0400
Subject: fixed pdf boxes to be active in lightboxview by fixing lightboxview
 docview to be observable so that IsLightboxDoc's will invalidate.  made
 webBox's content 'relative' so that linksButton is in correct place.  changed
 text highlight color to orange for webboxes

---
 src/client/views/LightboxView.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/client/views/LightboxView.tsx')

diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index cb5094f4b..e3e8403df 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -39,7 +39,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
     private static _savedState: Opt<{ panX: Opt<number>; panY: Opt<number>; scale: Opt<number>; scrollTop: Opt<number> }>;
     private static _history: Opt<{ doc: Doc; target?: Doc }[]> = [];
     @observable private static _future: Opt<Doc[]> = [];
-    private static _docView: Opt<DocumentView>;
+    @observable private static _docView: Opt<DocumentView>;
     private static openInTabFunc: any;
     static path: { doc: Opt<Doc>; target: Opt<Doc>; history: Opt<{ doc: Doc; target?: Doc }[]>; future: Opt<Doc[]>; saved: Opt<{ panX: Opt<number>; panY: Opt<number>; scale: Opt<number>; scrollTop: Opt<number> }> }[] = [];
     @action public static SetLightboxDoc(doc: Opt<Doc>, target?: Doc, future?: Doc[], layoutTemplate?: Doc) {
@@ -98,7 +98,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
         return true;
     }
     public static IsLightboxDocView(path: DocumentView[]) {
-        return path.includes(this._docView!);
+        return (path ?? []).includes(this._docView!);
     }
     @computed get leftBorder() {
         return Math.min(this.props.PanelWidth / 4, this.props.maxBorder[0]);
-- 
cgit v1.2.3-70-g09d2

