Blackberry Website Issue

I am working on a Blackberry web browser project in which using focus-based navigation.

Now my problem is that I focus on one button, and by clicking this button, I call ajax, which in turn loads the new html for another page and loads it into the specified div.

Now I need to set focus to one of the elements of the loaded html, but it does not work, and the focus is still on the last focused element.

Awaiting decision.

+4
source share
1 answer

Focus mode event handlers assigned to page elements are introduced at the first page load (HTTP request), and not after each subsequent DOM change (whether via AJAX or direct JavaScript).

Here's the official documentation on focus mode navigation: https://developer.blackberry.com/html5/documentation/using_the_navigation_mode_1866978_11.html

Suggest using appendChild () to add DOM elements to the page instead of innerHTML = "", and then see if these newly added elements have focus events.

+1
source

Source: https://habr.com/ru/post/1445471/


All Articles