aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/DocumentDecorations.tsx1
-rw-r--r--src/client/views/InkingStroke.tsx2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index a30252b0c..40eb1fe2b 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -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
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx
index 3b9edbc56..f63a27426 100644
--- a/src/client/views/InkingStroke.tsx
+++ b/src/client/views/InkingStroke.tsx
@@ -83,7 +83,7 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps>() {
getAnchor = (addAsAnnotation: boolean, pinProps?: PinProps) => {
const subAnchor = this._subContentView?.getAnchor?.(addAsAnnotation);
- if (subAnchor !== this.rootDoc) return subAnchor;
+ if (subAnchor !== this.rootDoc && subAnchor) return subAnchor;
if (!addAsAnnotation && !pinProps) return this.rootDoc;