fix(app): crossing focus for any element in a hidden part
Focus held by any element that a crossing hides or unmounts (button, tool, canvas, link) goes to the shown tab, decided by the element leaving the page, not by tag; a field still commits first; visible focus stays. History pair: remembered field must be connected, and a pointer-down off a field keeps it. TextField.commit compares with the latest committed value. Open-panel axe settles and checks dialogs like the other places. R-24: no assertion rewritten or deleted; one Chromium case and three unit tests added.
This commit is contained in:
1 parent
a474ddaa40
commit
606f7ba268
8 files changed
+81
-18
No files matched your search
@@ -295,6 +295,21 @@ test.describe('editor shell, width crossing (H)', () => {
|
||||
.not.toBeNull()
|
||||
})
|
||||
|
||||
test('a focused drawing tool hands its focus to the shown tab on a crossing', async ({
|
||||
page,
|
||||
}) => {
|
||||
await open(page)
|
||||
await selectTab(page, dict, 'annotations')
|
||||
const zone = page.getByRole('button', {
|
||||
name: dict['editor.annotations.tool.zone'],
|
||||
exact: true,
|
||||
})
|
||||
await expect(zone).toBeEnabled()
|
||||
await zone.focus()
|
||||
await cross(page, NARROW)
|
||||
await expect(active(page)).toHaveAttribute('id', 'editor-tab-annotations')
|
||||
})
|
||||
|
||||
test('a drag across the crossing commits nothing', async ({ page }) => {
|
||||
await open(
|
||||
page,
|
||||
|
||||
Reference in new issue
Block a user