aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentButtonBar.tsx
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2021-01-17 11:48:16 -0800
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2021-01-17 11:48:16 -0800
commitfd4a1c602396362e9f0a1effa87fc751614e541b (patch)
tree400d22b39d3e8281f34b8834cf4c73ddc1a9551e /src/client/views/DocumentButtonBar.tsx
parent692e619d8775e273c32e7bde804718b3e691088b (diff)
parentf4f4cb6b3a639c3e1c0d291f1d290e80097cfa06 (diff)
changes
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r--src/client/views/DocumentButtonBar.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx
index fa0b9a238..96f5d78fd 100644
--- a/src/client/views/DocumentButtonBar.tsx
+++ b/src/client/views/DocumentButtonBar.tsx
@@ -187,7 +187,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
get pinButton() {
const targetDoc = this.view0?.props.Document;
const isPinned = targetDoc && Doc.isDocPinned(targetDoc);
- return !targetDoc ? (null) : <Tooltip title={<><div className="dash-tooltip">{SelectionManager.SelectedDocuments().length > 1 ? "Pin multiple documents to presentation" : "Pin to presentation"}</div></>}>
+ return !targetDoc ? (null) : <Tooltip title={<><div className="dash-tooltip">{SelectionManager.Views().length > 1 ? "Pin multiple documents to presentation" : "Pin to presentation"}</div></>}>
<div className="documentButtonBar-linker"
style={{ color: "white" }}
onClick={undoBatch(e => this.props.views().map(view => view && TabDocView.PinDoc(view.props.Document, false)))}>
@@ -336,10 +336,10 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
}
openContextMenu = (e: React.MouseEvent) => {
- let child = SelectionManager.SelectedDocuments()[0].ContentDiv!.children[0];
+ let child = SelectionManager.Views()[0].ContentDiv!.children[0];
while (child.children.length) {
const next = Array.from(child.children).find(c => typeof (c.className) === "string");
- if (next?.className.includes("documentView-node")) break;
+ if (next?.className.includes(DocumentView.ROOT_DIV)) break;
if (next?.className.includes("dashFieldView")) break;
if (next) child = next;
else break;