diff --git a/src/core/event/index.js b/src/core/event/index.js index ed5148165..9d7a1b3b1 100644 --- a/src/core/event/index.js +++ b/src/core/event/index.js @@ -57,12 +57,15 @@ export function Events(Base) { return; } - const observer = new IntersectionObserver(entries => { - const isIntersecting = entries[0].isIntersecting; - const op = isIntersecting ? 'remove' : 'add'; + const observer = new IntersectionObserver( + entries => { + const isIntersecting = entries[0].isIntersecting; + const op = isIntersecting ? 'remove' : 'add'; - dom.body.classList[op]('sticky'); - }); + dom.body.classList[op]('sticky'); + }, + { threshold: 0.01 }, + ); observer.observe(coverElm); }