diff --git a/frontend/src/utils/focus-management.ts b/frontend/src/utils/focus-management.ts index 9173bf496e4..d6c382ee623 100644 --- a/frontend/src/utils/focus-management.ts +++ b/frontend/src/utils/focus-management.ts @@ -36,7 +36,7 @@ const focusableSelector = [ "textarea:not([disabled])", ] .map( - import.meta.env?.NODE_ENV === "test" + import.meta.test ? // TODO: Remove this once JSDOM fixes the issue where an element that is // "hidden" can be the document.activeElement, because this is not possible // in real browsers.