fix(editor): edit mode focuses the draft, tile edit call
This commit is contained in:
1 parent
6c0f913104
commit
5059641c04
4 files changed
+43
-3
No files matched your search
@@ -415,6 +415,15 @@ describe('read-only flip and the gone rule', () => {
|
||||
expect(field).toHaveFocus()
|
||||
})
|
||||
|
||||
it('« Modifier » puts the focus on the first control of the draft', async () => {
|
||||
const user = await mount()
|
||||
await openFinding(user, /Cat A/)
|
||||
await user.click(inDialog().getByRole('button', { name: 'Modifier' }))
|
||||
const active = document.activeElement
|
||||
expect(active).not.toBe(document.body)
|
||||
expect(active?.closest('form[data-draft-form]')).not.toBeNull()
|
||||
})
|
||||
|
||||
it('a flip to read-only while « Modifier » holds the focus keeps it in the dialog (the tab row is inert)', async () => {
|
||||
const user = await mount()
|
||||
await openFinding(user, /Cat A/)
|
||||
|
||||
Reference in new issue
Block a user