I had problems setting a focus on a div without having a height associated with it, although I did not put any listeners on it to check.
document.getElementById(newPos).focus();
However, without altering the newPos code to that, it errored.
With heights set, and using that alteration it allowed me to switch focus between two divs.
<body onload="var test = 'test2'; document.getElementById(test).focus()">
<div id="test">
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.<br />
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.<br />
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.<br />
</div>
<div id="test2" style="height: 50px; overflow: auto">
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.<br />
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.<br />
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.<br />
</div>
Change test from 'test2' to test to see the difference. In the second example it focuses, and I can keypress and it will move up and down. I think it's something to do with the scrolling that causes it.
Hope that is of some help.