fix(editor): redo and move-mode handle keys keep pending work
Final review I-1. Redo (Ctrl+Shift+Z and the header « Refaire ») is inactive while a started move or redraw, a keyboard series or a size change is pending (holdsRedo): the work stays, the user commits or cancels it first. In a move mode, Insert and Delete on a vertex and Enter or Space on « + » and « − » do nothing, as the press machine. Tests: no assertion removed. The history-guards move-mode helper and reset run in act, since « Refaire » now re-renders on a started mode.
This commit is contained in:
1 parent
c6b8c7e48a
commit
ae80511964
7 files changed
+211
-12
No files matched your search
@@ -395,12 +395,14 @@ describe('final review: queued landings (M-6)', () => {
|
||||
|
||||
describe('the drawing guard (R-12): a move mode and the navigations', () => {
|
||||
const STORED = { type: 'circle' as const, cx: 1, cy: 2, r: 3 }
|
||||
afterEach(resetWork)
|
||||
afterEach(() => act(() => resetWork()))
|
||||
const tabShown = () => screen.getByRole('tab', { selected: true })
|
||||
const started = () => {
|
||||
startMove('a', 'doc')
|
||||
setModePreview({ ...STORED, cx: 9 }, STORED)
|
||||
}
|
||||
// In act: « Refaire » now follows a started mode (final review I-1) and re-renders.
|
||||
const started = () =>
|
||||
act(() => {
|
||||
startMove('a', 'doc')
|
||||
setModePreview({ ...STORED, cx: 9 }, STORED)
|
||||
})
|
||||
|
||||
it('with no step taken, a tab ends the mode at once, without a question', async () => {
|
||||
useLocaleStore.setState({ locale: 'fr' })
|
||||
|
||||
Reference in new issue
Block a user