]> git.gir.st - VimFx.git/commit
Improve largest scrollable element detection
authorSimon Lydell <simon.lydell@gmail.com>
Sun, 22 Nov 2015 10:03:59 +0000 (11:03 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Sun, 22 Nov 2015 10:03:59 +0000 (11:03 +0100)
commit46fd6b2e23e0e7d238092078586ba9b4d52aeebd
tree6648f29241f16c1725cc8b681806acac79e8ff43
parentbd2b50d8a8f2f651a3351330bdbba871ab6b1309
Improve largest scrollable element detection

In commit f405054c a special case was added for the root element:

> Consider the entire page as largest if scrollable
>
> Its area may technically be less than other elements, but if it is scrollable
> that's what you expect to scroll.

However, if you embed such a page in a frame, the page won’t be scrollable
(because it is not the uppermost root element).

This made me realize that it makes the most sense to consider the _uppermost
scrollable element_ the largest. In other words, if a scrollable element
contains another scrollable element (or a frame containing one), the parent
should be considered largest even if the child has greater area.
documentation/commands.md
extension/lib/commands-frame.coffee
extension/lib/help.coffee
extension/lib/scrollable-elements.coffee
extension/lib/utils.coffee
Imprint / Impressum