E57B
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 b960519 commit 4e8be38Copy full SHA for 4e8be38
src/core/event/index.js
@@ -57,12 +57,15 @@ 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.body.classList[op]('sticky');
65
- });
+ dom.body.classList[op]('sticky');
66
+ },
67
+ { threshold: 0.01 },
68
+ );
69
70
observer.observe(coverElm);
71
0 commit comments