You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
container.getSpatialNavigationContainer is not a function #226
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
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.
I have included spatial-navigation-polyfill in the head of src/app.html
Some more detailed console.logs of just before until just after the error occurs:
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.
Activity
Yaffle commentedon Dec 11, 2021
What is the last element with focus before this happens?
perqa commentedon Dec 12, 2021
Here is one example:
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:

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.