fix(studio): commit lane edits through the edited element's own selection

An explicit null selection override now aborts the write instead of falling
back to domEditSelection: a caller that resolved a selection for its own
element and found none was committing onto whichever element happened to be
selected. Ease changes and the playhead keyframe toggle resolve the edited
element's animations and selection instead of the current selection's, and
lane header rows follow the real label-column width so a narrowed column no
longer hangs its value readout over the canvas.
This commit is contained in:
Miguel Angel Simon Sierra
2026-07-28 00:40:47 +02:00
parent 3181657147
commit c20c5366da
4 changed files with 28 additions and 5 deletions
@@ -313,7 +313,7 @@ export function useTimelineEditCallbacks({
: 0;
// Same frame for read and write: the toggled element's animations decide
// add-vs-remove, and its selection is what the mutation commits through.
const animations = resolveElementAnimations(el.key ?? el.id);
const animations = resolveElementAnimations(getTimelineElementIdentity(el));
void buildDomSelectionForTimelineElement(el).then((selection) => {
if (!selection) return;
const anim = animations.find((a) => a.keyframes);