Commit 15b4a8f9 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '54407-fix-limited-intersection-observers' into 'master'

Fix Image Lazy Loader for some older browsers

Closes #54407

See merge request gitlab-org/gitlab-ce!23349
parents cae50e42 ab83c1e4
......@@ -91,7 +91,9 @@ export default class LazyLoader {
onIntersection = entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
// We are using `intersectionRatio > 0` over `isIntersecting`, as some browsers did not ship the latter
// See: https://gitlab.com/gitlab-org/gitlab-ce/issues/54407
if (entry.intersectionRatio > 0) {
this.intersectionObserver.unobserve(entry.target);
this.lazyImages.push(entry.target);
}
......
---
title: Fix Image Lazy Loader for some older browsers
merge_request:
author:
type: fixed
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