Commit 98b8200d7df505ff08e51bde3c8f7421b866c892
Only do intersectionBindingViewport on the scrolling element, fixes filter in /public and new in books
Anders Rune Jensen committed on 5/20/2019, 6:47:52 PMParent: cf1df9edd4ee65bb572646c70380d08b9ea312f5
Files changed
app/html/scroller.js | changed |
app/html/scroller.js | ||
---|---|---|
@@ -8,17 +8,19 @@ | ||
8 | 8 | |
9 | 9 | function Scroller (opts = {}) { |
10 | 10 | const { prepend, content = null, append, classList = [], className = '', title = '', scrollIntoView } = opts |
11 | 11 | |
12 | - const contentSection = h('section.content', { title: '' }, content) | |
12 | + const contentSection = h('section.content', { | |
13 | + title: '', | |
14 | + intersectionBindingViewport: { rootMargin: '1000px' } // mutant magic | |
15 | + }, content) | |
13 | 16 | |
14 | 17 | const container = h('Scroller', |
15 | 18 | { |
16 | 19 | classList, |
17 | 20 | className, |
18 | 21 | title, |
19 | 22 | style: { 'overflow-y': 'scroll', 'overflow-x': 'auto' }, |
20 | - intersectionBindingViewport: { rootMargin: '1000px' } // mutant magic | |
21 | 23 | // TODO (watch for breaks e.g. stuff stops updating after scrolling) |
22 | 24 | }, |
23 | 25 | [ |
24 | 26 | prepend ? h('section.top', prepend) : null, |
Built with git-ssb-web