aboutsummaryrefslogtreecommitdiff
path: root/src/client/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views')
-rw-r--r--src/client/views/MainView.tsx8
-rw-r--r--src/client/views/pdf/PDFViewer.tsx2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index a87a07b62..f9b3b1da8 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -170,6 +170,14 @@ export class MainView extends React.Component {
window.addEventListener("drop", e => e.preventDefault(), false); // prevent default behavior of navigating to a new web page
window.addEventListener("dragover", e => e.preventDefault(), false);
document.addEventListener("pointerdown", this.globalPointerDown);
+ document.addEventListener("click", (e: MouseEvent) => {
+ if (!e.cancelBubble) {
+ const pathstr = (e as any)?.path.map((p: any) => p.classList?.toString()).join();
+ if (pathstr.includes("libraryFlyout")) {
+ SelectionManager.DeselectAll();
+ }
+ }
+ });
}
initAuthenticationRouters = async () => {
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index 0a52f6ad5..78576657c 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -607,7 +607,7 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
dragComplete: e => {
if (!e.aborted && e.annoDragData && !e.annoDragData.linkedToDoc) {
const link = DocUtils.MakeLink({ doc: annotationDoc }, { doc: e.annoDragData.dropDocument }, "Annotation");
- annotationDoc.isLinkButton = true;
+ annotationDoc.isLinkButton = true; // prevents link button fro showing up --- maybe not a good thing?
if (link) Doc.GetProto(link).followLinkLocation = "default";
}
}