We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e811756 commit a3192dcCopy full SHA for a3192dc
src/core/event/index.js
@@ -57,12 +57,17 @@ export function Events(Base) {
57
return;
58
}
59
60
- const observer = new IntersectionObserver(entries => {
61
- const isIntersecting = entries[0].isIntersecting;
62
- const op = isIntersecting ? 'remove' : 'add';
+ const observer = new IntersectionObserver(
+ entries => {
+ const isIntersecting = entries[0].isIntersecting;
63
+ const op = isIntersecting ? 'remove' : 'add';
64
- dom.toggleClass(dom.body, op, 'sticky');
65
- });
+ dom.toggleClass(dom.body, op, 'sticky');
66
+ },
67
+ {
68
+ threshold: 0.01,
69
70
+ );
71
72
observer.observe(coverElm);
73
0 commit comments