Skip to content

Commit c6be5da

Browse files
authored
Set focus on Separator on "pointerdown" (#534)
1 parent e08fe42 commit c6be5da

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/global/event-handlers/onWindowPointerDown.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@ export function onWindowPointerDown(event: PointerEvent) {
1818
const separators = new Set<RegisteredSeparator>();
1919
const initialLayoutMap = new Map<RegisteredGroup, Layout>();
2020

21+
let didChangeFocus = false;
22+
2123
hitRegions.forEach((current) => {
2224
groups.add(current.group);
2325
current.panels.forEach((panel) => {
2426
panels.add(panel);
2527
});
2628
if (current.separator) {
2729
separators.add(current.separator);
30+
31+
if (!didChangeFocus) {
32+
didChangeFocus = true;
33+
34+
current.separator.element.focus();
35+
}
2836
}
2937

3038
const match = mountedGroups.get(current.group);

0 commit comments

Comments
 (0)