Commit 2f3eeb10 authored by Phil Hughes's avatar Phil Hughes

Fixes sticky class being removed when over-scrolling in Safari

Closes #36457
parent de0d0e4e
export const isSticky = (el, scrollY, stickyTop) => { export const isSticky = (el, scrollY, stickyTop) => {
const top = el.offsetTop - scrollY; const top = el.offsetTop - scrollY;
if (top === stickyTop) { if (top <= stickyTop) {
el.classList.add('is-stuck'); el.classList.add('is-stuck');
} else { } else {
el.classList.remove('is-stuck'); el.classList.remove('is-stuck');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment