Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

container.getSpatialNavigationContainer is not a function #226

Open

Description

@perqa

Added the polyfill to a web app. Key navigation works for a start, but after some navigation the following error is thrown on every key event:

Uncaught TypeError: container.getSpatialNavigationContainer is not a function
    at navigate (spatial-navigation-polyfill.js:207)
    at spatial-navigation-polyfill.js:110

Activity

  1. Yaffle commented on Dec 11, 2021

    @Yaffle
    Contributor

    What is the last element with focus before this happens?

  2. perqa commented on Dec 12, 2021

    @perqa
    Author

    Here is one example:

    Screenshot 2021-12-12 at 15 19 55

    The error seems to occur when navigating down from the top menu into the scroll area, but not immediately. Nothing gets focus in the scroll area, and on the third key press downwards, the error occurs. Scrolling back up again three steps or more doesn't help, as long as the top menu is outside the screen. If use the mouse to bring the top menu into view, the error stops happening, as long as I stay in the top menu.


    Some more detailed console.logs of just before until just after the error occurs:
    Screenshot 2021-12-15 at 09 21 42

    To reproduce, just press arrow down a few times, starting from top menu Movie tab.


    On the People tab, spatial navigation works as expected (except there is no visual cue of focus). The DOM structure looks pretty much the same on in the Movie tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions