philc/vimium — pull request #1063 by fent (2014-05-20 08:16:29+00:00)
Title: get new element position for each scroll tested element

This fixes an issue where the `activatedElement`s width/height will be used even if that element is not the element that ends up being scrolled.

You can test this on most pages that have a big enough body to scroll, such as

https://github.com/philc/vimium

Click on an element on the page to make it the `activatedElement`, then press `G` to attempt to scroll all the way down. Instead the page will be scrolled near the top, since the `clientHeight` of the element is smaller than the body, and the body is the closest scrollable element.