]> git.gir.st - VimFx.git/commit
Improve scrollable element detection when zoomed
authorSimon Lydell <simon.lydell@gmail.com>
Sat, 21 Nov 2015 10:22:26 +0000 (11:22 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Sat, 21 Nov 2015 10:22:26 +0000 (11:22 +0100)
commite1fe9923fa57168764b97adebf04094bcb654f79
tree0c403d5d2eee39e95ee38e8cf20e2ede434a583f
parent4faeabc017ebcd6e000a4b6ab791306511e783ec
Improve scrollable element detection when zoomed

Elements may overflow when zooming in or out. However, the `.scrollHeight` of
the element is not correctly updated when the 'overflow' event occurs, making it
possible for unscrollable elements to slip in. An example is Google Groups.
There, the entire page gets an 'overflow' event when zooming, and by then it
actually looks to be scrollable. When inspecting the element afterwards, though,
it becomes clear that it is not. Well, actually, then it looks like the element
is scrollable by 1px. So this commit also sets a minimum scroll to 5px.

The solution to the zoom problem is to check if the largest scrollable element
really is scrollable before trying to scroll it. If not, update it.

See #605.
extension/lib/commands-frame.coffee
extension/lib/events-frame.coffee
extension/lib/scrollable-elements.coffee
extension/lib/vim-frame.coffee
Imprint / Impressum