Skip to content

The open-source CapCut alternative

fix selection not getting cleared after element deletion

Maze Winther33a8705f0d96
diff --git a/apps/web/src/hooks/actions/use-editor-actions.ts b/apps/web/src/hooks/actions/use-editor-actions.ts
index d1ff6c92..1ce890cb 100644
--- a/apps/web/src/hooks/actions/use-editor-actions.ts
+++ b/apps/web/src/hooks/actions/use-editor-actions.ts
@@ -199,6 +199,7 @@ export function useEditorActions() {
editor.timeline.deleteElements({
elements: selectedElements,
});
+ editor.selection.clearSelection();
},
undefined,
);