// @ts-ignore untyped import { FOCUSABLE_ELEMENTS, toArray } from '@uppy/utils' import getActiveOverlayEl from './getActiveOverlayEl.js' type $TSFixMe = any function focusOnFirstNode(event: $TSFixMe, nodes: $TSFixMe) { const node = nodes[0] if (node) { node.focus() event.preventDefault() } } function focusOnLastNode(event: $TSFixMe, nodes: $TSFixMe) { const node = nodes[nodes.length - 1] if (node) { node.focus() event.preventDefault() } } // ___Why not just use (focusedItemIndex === -1)? // Firefox thinks