]> git.gir.st - VimFx.git/commit
Fix scrolling of `<html>` if `<body>` is scrollable
authorSimon Lydell <simon.lydell@gmail.com>
Fri, 4 Dec 2015 07:12:02 +0000 (08:12 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Fri, 4 Dec 2015 19:22:30 +0000 (20:22 +0100)
commit57faacaa4b81ef05e43326e024023a31c1f86e8b
tree3accbb792c0ab9963baf07202654736d4188fd32
parent38d984c58004ef4a1220f76c5ebdae881085121f
Fix scrolling of `<html>` if `<body>` is scrollable

`document.activeElement` is never `null`. If no element if focused, it is
`document.body`. If `document.body` is scrollable, it means that `<html>` can
never be scrolled.

This commit only allows to scroll `<body>` if it has been explicitly focused (or
if it is the largest scrollable element, of course).

Fixes #633.
extension/lib/commands-frame.coffee
extension/lib/events-frame.coffee
extension/lib/vim-frame.coffee
Imprint / Impressum