Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Update Timeline.tsx

ameer2468c138b323daf5
diff --git a/apps/desktop/src/routes/editor/Timeline.tsx b/apps/desktop/src/routes/editor/Timeline.tsx
index 05da942e7..22af9b4c3 100644
--- a/apps/desktop/src/routes/editor/Timeline.tsx
+++ b/apps/desktop/src/routes/editor/Timeline.tsx
@@ -148,7 +148,9 @@ export function Timeline() {
createRoot((dispose) => {
createEventListener(e.currentTarget, "mouseup", () => {
handleUpdatePlayhead(e);
- setState("timelineSelection", null);
+ if (zoomSegmentDragState.type === "idle") {
+ setState("timelineSelection", null);
+ }
});
createEventListener(window, "mouseup", () => {
dispose();
@@ -659,14 +661,10 @@ function ZoomTrack(props: {
resumeHistory();
if (!moved) {
e.stopPropagation();
- if (
- state.timelineSelection?.type !== "zoom" &&
- state.timelineSelection?.index !== i()
- )
- setState("timelineSelection", {
- type: "zoom",
- index: i(),
- });
+ setState("timelineSelection", {
+ type: "zoom",
+ index: i(),
+ });
props.handleUpdatePlayhead(e);
}
props.onDragStateChanged({ type: "idle" });