From 3d0ce74f93680b5dbac18e84059ecd654b4d306e Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Fri, 17 May 2024 11:52:16 +0700 Subject: [PATCH] fix(web): fixes error on tab, enter when only a single input element is on the page --- web/src/app/browser/src/defaultBrowserRules.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/app/browser/src/defaultBrowserRules.ts b/web/src/app/browser/src/defaultBrowserRules.ts index 723792d83ea..cbd70fc8c77 100644 --- a/web/src/app/browser/src/defaultBrowserRules.ts +++ b/web/src/app/browser/src/defaultBrowserRules.ts @@ -38,7 +38,7 @@ export default class DefaultBrowserRules extends DefaultRules { const contextManager = this.contextManager; const activeElement = contextManager.activeTarget?.getElement(); const nextElement = contextManager.page.findNeighboringInput(activeElement, back); - nextElement.focus(); + nextElement?.focus(); } switch(code) {