]> git.gir.st - VimFx.git/commit
Scroll closest scrollable parent
authorSimon Lydell <simon.lydell@gmail.com>
Tue, 10 Jan 2017 06:53:00 +0000 (07:53 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Tue, 10 Jan 2017 06:53:00 +0000 (07:53 +0100)
commit1606cb8bab69a7f79a2c11bfb6ec88bdfbf7a4c0
treea5ce3f37da65c1e4452376e0b864fb81dbf44941
parent34c27546ba094dc7b7459dd75fb8030196a95c4d
Scroll closest scrollable parent

If you click a tweet on Twitter, a modal with the tweet as well as
responses to it pop up. That modal can be scrollable if there are enough
responses. The container for the main tweet is focused. It feels very
natural that the _modal_ should scroll when using VimFx commands, not
the page behind it. That used not to be the case, but now is. This was
implemented by not just checking if the active element _itself_ is
scrollable, but also whether one of its _parents_ are scrollable, and
using the closest scrollable parent (if any).
extension/lib/commands-frame.coffee
Imprint / Impressum