fix(editor): commit a keyed series as a press starts on the drawing

Final review I-1 audit. A touch press moves no focus before its
pointer-up, so a press on « + » or « − », or a drag, committed over an
arrow or slider series still pending on the focused handle and dropped
it. A fresh press now commits it first (commitFocusedSeries, its own
blur), as the mouse's focus move already did.

Tests: no assertion removed; header « Refaire » cases added for a
started redraw and a size change.
This commit is contained in:
bchanot committed 2026-11-18 13:12:55 +01:00
1 parent 13e2503e6a
commit 10a8767527
3 files changed
+67

No files matched your search

@@ -175,6 +175,16 @@ describe('redo with something pending (final review I-1)', () => {
expect(redo).toHaveAttribute('aria-disabled', 'true')
})
it('the header « Refaire » is off and keeps a pending size change', async () => {
await undone()
pend('size')
const redo = screen.getByRole('button', { name: REDO })
fireEvent.click(redo)
expect(useAnnotationWork.getState().preview?.source).toBe('size')
expect(cx()).toMatchObject({ cx: 50 })
expect(redo).toHaveAttribute('aria-disabled', 'true')
})
it('once the work is gone, redo works again', async () => {
await undone()
pend('keys')