Skip to content

Commit 5b60028

Browse files
committed
Merge branch 'release/11.0.3'
2 parents 6b0e307 + 2c664dc commit 5b60028

14 files changed

+25
-19
lines changed

Diff for: CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
## Version 11
44

5+
#### 11.0.3
6+
7+
Rollback of the patch applied in 11.0.2 since it gave strange results in some cases. See #293. Thanks to @davejamesmiller for the analysis and the report.
8+
59
#### 11.0.2
610

7-
Applied a patch to resolve #293 a [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=910741#c13) already fixed in Chrome 72. Thanks to @dverbovyi for reporting, analyzing and solving it.
11+
Applied a patch to resolve #293 a [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=910741#c13) already fixed in Chrome 72. Thanks to @dverbovyi for the analysis and the report.
812

913
#### 11.0.1
1014

Diff for: README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Notes:
107107

108108
### Include LazyLoad in your project
109109

110-
The latest, recommended version of LazyLoad is **11.0.2**, which leverages the power and speed of the browser's **IntersectionObserver** API.
110+
The latest, recommended version of LazyLoad is **11.0.3**, which leverages the power and speed of the browser's **IntersectionObserver** API.
111111

112112
#### IntersectionObserver: to polyfill or not to polyfill?
113113

@@ -122,14 +122,14 @@ If you prefer to load a polyfill, the regular LazyLoad behaviour is granted.
122122
The easiest way to use LazyLoad is to include the script from a CDN:
123123

124124
```html
125-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/lazyload.min.js"></script>
125+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/lazyload.min.js"></script>
126126
```
127127

128128
Or, with the IntersectionObserver polyfill:
129129

130130
```html
131131
<script src="https://cdn.jsdelivr.net/npm/[email protected]/intersection-observer.js"></script>
132-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/lazyload.min.js"></script>
132+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/lazyload.min.js"></script>
133133
```
134134

135135
Then, in your javascript code:
@@ -164,7 +164,7 @@ Include RequireJS:
164164
Then `require` the AMD version of LazyLoad, like this:
165165

166166
```js
167-
var lazyLoadAmdUrl = "https://cdn.jsdelivr.net/npm/[email protected].2/dist/lazyload.amd.min.js";
167+
var lazyLoadAmdUrl = "https://cdn.jsdelivr.net/npm/[email protected].3/dist/lazyload.amd.min.js";
168168
var polyfillAmdUrl = "https://cdn.jsdelivr.net/npm/[email protected]/intersection-observer-amd.js";
169169

170170
/// Dynamically define the dependencies
@@ -209,7 +209,7 @@ To do so, **you must define the options before including the script**. You can p
209209
Then include the script.
210210
211211
```html
212-
<script async src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/lazyload.min.js"></script>
212+
<script async src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/lazyload.min.js"></script>
213213
```
214214
215215
**Possibly place the script tag right before the closing `</body>` tag**. If you can't do that, LazyLoad could be executed before the browser has loaded all the DOM, and you'll need to call its `update()` method to make it check the DOM again.
@@ -235,7 +235,7 @@ Same as above, but you must put the `addEventListener` code shown below before i
235235
Then include the script.
236236
237237
```html
238-
<script async src="https://cdn.jsdelivr.net/npm/[email protected].2/dist/lazyload.min.js"></script>
238+
<script async src="https://cdn.jsdelivr.net/npm/[email protected].3/dist/lazyload.min.js"></script>
239239
```
240240
241241
Now you'll be able to call its methods, like:

Diff for: dist/lazyload.amd.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ define(function () {
370370
};
371371

372372
var isIntersecting = function isIntersecting(entry) {
373-
return entry.intersectionRatio > 0;
373+
return entry.isIntersecting || entry.intersectionRatio > 0;
374374
};
375375

376376
var getObserverSettings = function getObserverSettings(settings) {

Diff for: dist/lazyload.amd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/lazyload.amd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/lazyload.esm.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ const revealElement = (element, instance, force) => {
348348
callbackIfSet(settings.callback_reveal, element);
349349
};
350350

351-
const isIntersecting = entry => entry.intersectionRatio > 0;
351+
const isIntersecting = entry =>
352+
entry.isIntersecting || entry.intersectionRatio > 0;
352353

353354
const getObserverSettings = settings => ({
354355
root: settings.container === document ? null : settings.container,

Diff for: dist/lazyload.iife.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ var LazyLoad = function () {
370370
};
371371

372372
var isIntersecting = function isIntersecting(entry) {
373-
return entry.intersectionRatio > 0;
373+
return entry.isIntersecting || entry.intersectionRatio > 0;
374374
};
375375

376376
var getObserverSettings = function getObserverSettings(settings) {

0 commit comments

Comments
 (0)