I find that, with the latest Symbian Browser 7.3 (NokiaBrowser/7.3.1.26, tested on E52), the behavior of the JavaScript focus() method for some controls has changed, at least for web pages in "tabbed mode": in my tests, it has now become quite difficult to impossible to move the focus to a particular element, e.g. as the default, by Java Script.
For example, let's look at this code (currently available at www.mgroeber.de/focustest.html):
When I open this with the E75 (BrowserNG/7.1.1) the default focus goes to the "Make a choice" combo box, and I can use the two links at the bottom to redirect the focus to the link or the combo box.HTML Code:<HEAD> <META NAME="navigation" CONTENT="tabbed"> <TITLE>Test</TITLE> </HEAD> <body onload="document.getElementById('test').focus()"> <a href="www.google.de" id="test2">Link</a> <p> <select id="test"> <option value="#">Make a choice ?</option> <option value="alpha">alpha</option> <option value="beta">beta</option> <option value="gamma">gamma</option> </select> <p> <a href="#x" onclick="document.getElementById('test').focus(); return false">Focus Select</a> - <a href="#x" onclick="document.getElementById('test2').focus(); return false">Focus Link</a> -
However, after opening the same page with an E52 (FW v71), the focus is on the "Focus Select" link instead. If I click this link, the focus does not seem to move. However, if I press [Up], [Down], the focus actually returns to the combo box, as if it had been moved there internally, without updating the UI. Even weirder, when I press [Right] [Left], and then press a digit key, the popup opens as expected, even without getting a focus rectangle. Afterwards, the focus behaves strangely in that I can *only* get the combo box to take focus any more.
So it seems the internal state and the page rendering get out of sync somehow - focus() in tabbed mode has always been a bit of a troublemaker, but this here looks clearly broken.
Candidate for a known issue / bugfix?

Reply With Quote

