scrolling bug fixes

Now pressing arrow up or down will always focus on the current element
correctly after div was scrolled with mouse.