Skip to content
This repository was archived by the owner on Oct 28, 2020. It is now read-only.

Commit f8de58c

Browse files
authored
fix: fixes issue with not window scroll issue (#660)
1 parent 07831c5 commit f8de58c

File tree

8 files changed

+28
-16
lines changed

8 files changed

+28
-16
lines changed

dist/jquery.stickybits.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@
326326
;
327327

328328
_proto.manageState = function manageState(item) {
329+
var _this3 = this;
330+
329331
// cache object
330332
var it = item;
331333
var p = it.props;
@@ -413,7 +415,7 @@
413415
classes: {}
414416
},
415417
stuck: {
416-
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns ? {
418+
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns || !_this3.isWin ? {
417419
position: 'absolute',
418420
top: '',
419421
bottom: '0'
@@ -477,14 +479,14 @@
477479
};
478480

479481
_proto.update = function update(updatedProps) {
480-
var _this3 = this;
482+
var _this4 = this;
481483

482484
if (updatedProps === void 0) {
483485
updatedProps = null;
484486
}
485487

486488
this.instances.forEach(function (instance) {
487-
_this3.computeScrollOffsets(instance);
489+
_this4.computeScrollOffsets(instance);
488490

489491
if (updatedProps) {
490492
// eslint-disable-next-line no-unused-vars

dist/jquery.stickybits.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.

dist/stickybits.es.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ function () {
321321
;
322322

323323
_proto.manageState = function manageState(item) {
324+
var _this3 = this;
325+
324326
// cache object
325327
var it = item;
326328
var p = it.props;
@@ -408,7 +410,7 @@ function () {
408410
classes: {}
409411
},
410412
stuck: {
411-
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns ? {
413+
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns || !_this3.isWin ? {
412414
position: 'absolute',
413415
top: '',
414416
bottom: '0'
@@ -472,14 +474,14 @@ function () {
472474
};
473475

474476
_proto.update = function update(updatedProps) {
475-
var _this3 = this;
477+
var _this4 = this;
476478

477479
if (updatedProps === void 0) {
478480
updatedProps = null;
479481
}
480482

481483
this.instances.forEach(function (instance) {
482-
_this3.computeScrollOffsets(instance);
484+
_this4.computeScrollOffsets(instance);
483485

484486
if (updatedProps) {
485487
// eslint-disable-next-line no-unused-vars

dist/stickybits.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@
327327
;
328328

329329
_proto.manageState = function manageState(item) {
330+
var _this3 = this;
331+
330332
// cache object
331333
var it = item;
332334
var p = it.props;
@@ -414,7 +416,7 @@
414416
classes: {}
415417
},
416418
stuck: {
417-
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns ? {
419+
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns || !_this3.isWin ? {
418420
position: 'absolute',
419421
top: '',
420422
bottom: '0'
@@ -478,14 +480,14 @@
478480
};
479481

480482
_proto.update = function update(updatedProps) {
481-
var _this3 = this;
483+
var _this4 = this;
482484

483485
if (updatedProps === void 0) {
484486
updatedProps = null;
485487
}
486488

487489
this.instances.forEach(function (instance) {
488-
_this3.computeScrollOffsets(instance);
490+
_this4.computeScrollOffsets(instance);
489491

490492
if (updatedProps) {
491493
// eslint-disable-next-line no-unused-vars

0 commit comments

Comments
 (0)