We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 766292c commit 0e479a3Copy full SHA for 0e479a3
lib/web/mage/sticky.js
@@ -53,10 +53,8 @@ define([
53
54
offset = Math.max(0, Math.min(offset, this.maxOffset));
55
56
- if (offset &&
57
- this.options.offsetTop &&
58
- !this.element.hasClass(this.options.stickyClass)) {
59
-
+ var stuck = this.element.hasClass(this.options.stickyClass);
+ if (offset && this.options.offsetTop && !stuck) {
60
var offsetTop = 0;
61
if (typeof this.options.offsetTop === 'function') {
62
offsetTop = this.options.offsetTop();
0 commit comments