Preserve prompt edits during timeline drag
tests / test (push) Canceled after 0s
tests / windows-storage (push) Canceled after 0s

This commit is contained in:
2026-10-15 08:42:44 +00:00
parent 3f006030c6
commit 17c2ad5f0f
+6 -1
View File
@@ -127,7 +127,12 @@ function configure(node) {
slot.end = point; next.start = point; updateTimeline();
};
handle.onpointerdown = (event) => {
event.preventDefault(); handle.setPointerCapture?.(event.pointerId);
event.preventDefault();
// Textarea edits are intentionally committed on change, but a
// drag can happen while it still has focus. Capture them before
// the timeline redraws the prompt from state.
if (prompt) syncPrompt(clip, prompt.value);
handle.setPointerCapture?.(event.pointerId);
handle.onpointermove = move;
handle.onpointerup = () => { handle.onpointermove = null; setState(); render(); };
};