Skip to content

Commit a94d464

Browse files
fix: add a focus listener on the parent svg (#156)
* fix: add a focus listener on the parent svg * chore: move focus management into index.ts
1 parent 0402a4d commit a94d464

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ export class KeyboardNavigation {
4141
workspace.getSvgGroup().addEventListener('blur', () => {
4242
navigationController.setHasFocus(workspace, false);
4343
});
44+
// Temporary workaround for #136.
45+
// TODO(#136): fix in core.
46+
workspace.getParentSvg().addEventListener('focus', () => {
47+
navigationController.setHasFocus(workspace, true);
48+
});
49+
workspace.getParentSvg().addEventListener('blur', () => {
50+
navigationController.setHasFocus(workspace, false);
51+
});
4452
}
4553

4654
/**

0 commit comments

Comments
 (0)