aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-09-21 22:33:24 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-09-21 22:33:24 -0400
commitdaa2bc99bf36e7f2994f6824d9ead3d4b0ffb33f (patch)
treed05e5ca234d6959e1f97c1a2e3e247d44d280c9f /src/client/views/DocumentDecorations.tsx
parent0d6c1aa1869963e548374c634a65b27f0ea32de9 (diff)
parentdea73e7a5b72a7f709cde4ec438244af1963392d (diff)
Merge branch 'master' into sophie-report-manager
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 7e55b0ebc..40eb1fe2b 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -90,7 +90,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
@computed
get Bounds() {
- if (LinkFollower.IsFollowing) return { x: 0, y: 0, r: 0, b: 0 };
+ if (LinkFollower.IsFollowing || DocumentView.ExploreMode) return { x: 0, y: 0, r: 0, b: 0 };
const views = SelectionManager.Views();
return views
.filter(dv => dv.props.renderDepth > 0)
@@ -262,6 +262,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
}
});
if (!this._iconifyBatch) {
+ (document.activeElement as any).blur?.();
this._iconifyBatch = UndoManager.StartBatch(forceDeleteOrIconify ? 'delete selected docs' : 'iconifying');
} else {
forceDeleteOrIconify = false; // can't force immediate close in the middle of iconifying -- have to wait until iconifying completes
@@ -804,8 +805,6 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
</Tooltip>
);
- const colorScheme = StrCast(Doc.ActiveDashboard?.colorScheme);
-
const leftBounds = this.props.boundsLeft;
const topBounds = LightboxView.LightboxDoc ? 0 : this.props.boundsTop;
bounds.x = Math.max(leftBounds, bounds.x - this._resizeBorderWidth / 2) + this._resizeBorderWidth / 2;
@@ -818,7 +817,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
const useRotation = !hideResizers && seldocview.rootDoc.type !== DocumentType.EQUATION && seldocview.props.CollectionFreeFormDocumentView; // when do we want an object to not rotate?
const rotation = SelectionManager.Views().length == 1 ? NumCast(seldocview.rootDoc._rotation) : 0;
- const resizerScheme = colorScheme ? 'documentDecorations-resizer' + colorScheme : '';
+ const resizerScheme = '';
// Radius constants
const useRounding = seldocview.ComponentView instanceof ImageBox || seldocview.ComponentView instanceof FormattedTextBox || seldocview.ComponentView instanceof CollectionFreeFormView;
@@ -853,7 +852,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
const titleArea = this._editingTitle ? (
<input
ref={this._keyinput}
- className={`documentDecorations-title${colorScheme}`}
+ className="documentDecorations-title"
type="text"
name="dynbox"
autoComplete="on"
@@ -871,7 +870,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
e.stopPropagation;
}}>
{hideTitle ? null : (
- <span className={`documentDecorations-titleSpan${colorScheme}`} onPointerDown={this.onTitleDown}>
+ <span className="documentDecorations-titleSpan" onPointerDown={this.onTitleDown}>
{this.selectionTitle}
</span>
)}
@@ -887,7 +886,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
);
return (
- <div className={`documentDecorations${colorScheme}`} style={{ display: this._showNothing ? 'none' : undefined }}>
+ <div className="documentDecorations" style={{ display: this._showNothing ? 'none' : undefined }}>
<div
className="documentDecorations-background"
style={{