Skip to content

Commit 3100903

Browse files
authored
fix: Remove extra tab stop on XML group (#82)
Ben's PR #72 removed the tabindex on the enclosing DIV, but there's also a tabindex on the XML element that encloses the G that gets the focus/blur event listeners. Remove it. An alternative approach would be to add the event listeners to the XML element instead of the G element, and this might be preferable overall but breaks the visual indicator that you have tabbed to the workspace (and I don't know how to fix it) so I'm going with this approach for now.
1 parent 25470db commit 3100903

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ export class KeyboardNavigation {
3232
this.setGlowTheme();
3333
installCursor(workspace.getMarkerManager());
3434

35-
// Ensure that only the root SVG group has a tab index.
35+
// Ensure that only the root SVG G (group) has a tab index.
3636
workspace.getInjectionDiv().removeAttribute('tabindex');
37+
workspace.getParentSvg().removeAttribute('tabindex');
3738

3839
workspace.getSvgGroup().addEventListener('focus', () => {
3940
navigationController.setHasFocus(true);

0 commit comments

Comments
 (0)