Skip to content

Commit 55b8a89

Browse files
committed
4.1.3
1 parent 926c34d commit 55b8a89

File tree

8 files changed

+26
-12
lines changed

8 files changed

+26
-12
lines changed

dist/locomotive-scroll.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! locomotive-scroll v4.1.1 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
1+
/*! locomotive-scroll v4.1.2 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
22
html.has-scroll-smooth {
33
overflow: hidden; }
44

dist/locomotive-scroll.esm.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* locomotive-scroll v4.1.1 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
1+
/* locomotive-scroll v4.1.2 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
22
function _classCallCheck(instance, Constructor) {
33
if (!(instance instanceof Constructor)) {
44
throw new TypeError("Cannot call a class as a function");
@@ -1340,7 +1340,7 @@ var _default$1 = /*#__PURE__*/function (_Core) {
13401340

13411341
window.scrollTo({
13421342
top: offset,
1343-
behavior: 'smooth'
1343+
behavior: options.duration === 0 ? 'auto' : 'smooth'
13441344
});
13451345
}
13461346
}, {
@@ -2153,6 +2153,9 @@ var _default$2 = /*#__PURE__*/function (_Core) {
21532153
key: "stopScrolling",
21542154
value: function stopScrolling() {
21552155
cancelAnimationFrame(this.checkScrollRaf); // Prevent checkScroll to continue looping
2156+
//Pevent scrollbar glitch/locking
2157+
2158+
this.startScrollTs = undefined;
21562159

21572160
if (this.scrollToRaf) {
21582161
cancelAnimationFrame(this.scrollToRaf);
@@ -2511,7 +2514,11 @@ var _default$2 = /*#__PURE__*/function (_Core) {
25112514
key: "releaseScrollBar",
25122515
value: function releaseScrollBar(e) {
25132516
this.isDraggingScrollbar = false;
2514-
this.html.classList.add(this.scrollingClass);
2517+
2518+
if (this.isScrolling) {
2519+
this.html.classList.add(this.scrollingClass);
2520+
}
2521+
25152522
this.html.classList.remove(this.draggingClass);
25162523
}
25172524
}, {

dist/locomotive-scroll.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* locomotive-scroll v4.1.1 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
1+
/* locomotive-scroll v4.1.2 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
22
(function (global, factory) {
33
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
44
typeof define === 'function' && define.amd ? define(factory) :
@@ -1346,7 +1346,7 @@
13461346

13471347
window.scrollTo({
13481348
top: offset,
1349-
behavior: 'smooth'
1349+
behavior: options.duration === 0 ? 'auto' : 'smooth'
13501350
});
13511351
}
13521352
}, {
@@ -2159,6 +2159,9 @@
21592159
key: "stopScrolling",
21602160
value: function stopScrolling() {
21612161
cancelAnimationFrame(this.checkScrollRaf); // Prevent checkScroll to continue looping
2162+
//Pevent scrollbar glitch/locking
2163+
2164+
this.startScrollTs = undefined;
21622165

21632166
if (this.scrollToRaf) {
21642167
cancelAnimationFrame(this.scrollToRaf);
@@ -2517,7 +2520,11 @@
25172520
key: "releaseScrollBar",
25182521
value: function releaseScrollBar(e) {
25192522
this.isDraggingScrollbar = false;
2520-
this.html.classList.add(this.scrollingClass);
2523+
2524+
if (this.isScrolling) {
2525+
this.html.classList.add(this.scrollingClass);
2526+
}
2527+
25212528
this.html.classList.remove(this.draggingClass);
25222529
}
25232530
}, {

dist/locomotive-scroll.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/locomotive-scroll.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dist/scripts/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dist/styles/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "locomotive-scroll",
3-
"version": "4.1.2",
3+
"version": "4.1.3",
44
"description": "Detection of elements in viewport & smooth scrolling with parallax effects.",
55
"repository": "locomotivemtl/locomotive-scroll",
66
"author": "Locomotive <[email protected]> (https://locomotive.ca)",

0 commit comments

Comments
 (0)