Commit 1998a4a1 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch 'safari-overscroll-sticky-fix' into 'master'

Fixes sticky class being removed when over-scrolling in Safari

Closes #36457

See merge request !13556
parents f8556d02 2f3eeb10
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