]> git.gir.st - VimFx.git/commit
Fix being unable to scroll in quirks mode
authorSimon Lydell <simon.lydell@gmail.com>
Sun, 22 Nov 2015 08:57:31 +0000 (09:57 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Sun, 22 Nov 2015 09:15:40 +0000 (10:15 +0100)
commitbd2b50d8a8f2f651a3351330bdbba871ab6b1309
tree2b0afe67c40dae7013c54f757e470dc6e82dce38
parentc4c764f1a5fb63d3e93fe977a750b20691bc3af8
Fix being unable to scroll in quirks mode

Alternatively:

Handle quirks mode in a better and more abstracted way.

In quirks mode, `<html>` might receive an 'overflow' event, but it is `<body>`
that is scrollable (and it does _not_ receive an 'overflow' event!) The
`ScrollableElements` class now automatically takes care of this case, storing
`<body>` instead if you try to store `<html>` in quirks mode. This way, only
actually scrollable elements are stored, which makes comparisons such as
`isScrollable` work without having to think about quirks mode. Previously, the
`isScrollable` check in the 'overflow' event handler failed on `<html>` in
quirks mode, making it impossible to scroll on quirky sites, such as Hackernews.

Fixes #621.
extension/lib/commands-frame.coffee
extension/lib/scrollable-elements.coffee
Imprint / Impressum