From 1d4e531ebed00e1d3e210e2c1ab6c93244fb3d4e Mon Sep 17 00:00:00 2001 From: Erik Pasternak Date: Tue, 10 Jun 2025 11:24:42 -0700 Subject: [PATCH] Don't allow things in a flyout to be deleted or moved. --- core/block.ts | 2 ++ core/comments/workspace_comment.ts | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/block.ts b/core/block.ts index 43bc6bbc5..9f7c11d4f 100644 --- a/core/block.ts +++ b/core/block.ts @@ -791,6 +791,7 @@ export class Block { isDeletable(): boolean { return ( this.deletable && + !this.isInFlyout && !this.shadow && !this.isDeadOrDying() && !this.workspace.isReadOnly() @@ -824,6 +825,7 @@ export class Block { isMovable(): boolean { return ( this.movable && + !this.isInFlyout && !this.shadow && !this.isDeadOrDying() && !this.workspace.isReadOnly() diff --git a/core/comments/workspace_comment.ts b/core/comments/workspace_comment.ts index 190efd64d..b5dc3023c 100644 --- a/core/comments/workspace_comment.ts +++ b/core/comments/workspace_comment.ts @@ -165,7 +165,11 @@ export class WorkspaceComment { * workspace is read-only. */ isMovable() { - return this.isOwnMovable() && !this.workspace.isReadOnly(); + return ( + this.isOwnMovable() && + !this.workspace.isReadOnly() && + !this.workspace.isFlyout + ); } /** @@ -189,7 +193,8 @@ export class WorkspaceComment { return ( this.isOwnDeletable() && !this.isDeadOrDying() && - !this.workspace.isReadOnly() + !this.workspace.isReadOnly() && + !this.workspace.isFlyout ); }