Only focus focusable HTMLElements

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-03-31 10:48:41 +02:00
parent de5a5345b6
commit 3f4d007f0e
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -221,7 +221,7 @@ export default class App extends Vue {
? this.routerView?.$refs?.componentFocusTarget
: this.routerView?.$el
) as HTMLElement;
if (focusTarget) {
if (focusTarget && focusTarget instanceof Element) {
// Make focustarget programmatically focussable
focusTarget.setAttribute("tabindex", "-1");