Skip to content

Commit fb7c7b8

Browse files
authored
fix: Remove tabindex if it wasn't originally present when disposing of KeyboardNavigation. (#198)
1 parent 552a5d7 commit fb7c7b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,16 @@ export class KeyboardNavigation {
101101
this.workspace
102102
.getParentSvg()
103103
.setAttribute('tabindex', this.workspaceParentTabIndex);
104+
} else {
105+
this.workspace.getParentSvg().removeAttribute('tabindex');
104106
}
105107

106108
if (this.injectionDivTabIndex) {
107109
this.workspace
108110
.getInjectionDiv()
109111
.setAttribute('tabindex', this.injectionDivTabIndex);
112+
} else {
113+
this.workspace.getInjectionDiv().removeAttribute('tabindex');
110114
}
111115

112116
this.cursor.uninstall();

0 commit comments

Comments
 (0)