js: Change JS_GetClass() -> JS_GET_CLASS()
ui: Fix regression in how navigation list wrapping is handling

Fixes #2078