Wagtail client-side components
    Preparing search index...

    Variable forceFocusConst

    forceFocus: DebouncedFunction<
        [element: HTMLElement | SVGElement, FocusOptions?],
        void,
    > = ...

    Trigger a focus on a potentially non-focusable element, awaiting for any delays in DOM creation. Smoothly scroll to the element if it is not already in view, then trigger a DOM focus.

    Once the target element loses focus, the tabindex attribute, if it was added, remove the attribute.

    forceFocus(document.getElementById('my-element') as HTMLElement);