Skip to content

Commit

Permalink
fix: fixes issue with not window scroll issue (dollarshaveclub#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
yowainwright authored Feb 18, 2020
1 parent 07831c5 commit f8de58c
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 16 deletions.
8 changes: 5 additions & 3 deletions dist/jquery.stickybits.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@
;

_proto.manageState = function manageState(item) {
var _this3 = this;

// cache object
var it = item;
var p = it.props;
Expand Down Expand Up @@ -413,7 +415,7 @@
classes: {}
},
stuck: {
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns ? {
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns || !_this3.isWin ? {
position: 'absolute',
top: '',
bottom: '0'
Expand Down Expand Up @@ -477,14 +479,14 @@
};

_proto.update = function update(updatedProps) {
var _this3 = this;
var _this4 = this;

if (updatedProps === void 0) {
updatedProps = null;
}

this.instances.forEach(function (instance) {
_this3.computeScrollOffsets(instance);
_this4.computeScrollOffsets(instance);

if (updatedProps) {
// eslint-disable-next-line no-unused-vars
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.stickybits.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions dist/stickybits.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ function () {
;

_proto.manageState = function manageState(item) {
var _this3 = this;

// cache object
var it = item;
var p = it.props;
Expand Down Expand Up @@ -408,7 +410,7 @@ function () {
classes: {}
},
stuck: {
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns ? {
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns || !_this3.isWin ? {
position: 'absolute',
top: '',
bottom: '0'
Expand Down Expand Up @@ -472,14 +474,14 @@ function () {
};

_proto.update = function update(updatedProps) {
var _this3 = this;
var _this4 = this;

if (updatedProps === void 0) {
updatedProps = null;
}

this.instances.forEach(function (instance) {
_this3.computeScrollOffsets(instance);
_this4.computeScrollOffsets(instance);

if (updatedProps) {
// eslint-disable-next-line no-unused-vars
Expand Down
8 changes: 5 additions & 3 deletions dist/stickybits.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@
;

_proto.manageState = function manageState(item) {
var _this3 = this;

// cache object
var it = item;
var p = it.props;
Expand Down Expand Up @@ -414,7 +416,7 @@
classes: {}
},
stuck: {
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns ? {
styles: _extends((_extends2 = {}, _extends2[vp] = '', _extends2), pv === 'fixed' && !ns || !_this3.isWin ? {
position: 'absolute',
top: '',
bottom: '0'
Expand Down Expand Up @@ -478,14 +480,14 @@
};

_proto.update = function update(updatedProps) {
var _this3 = this;
var _this4 = this;

if (updatedProps === void 0) {
updatedProps = null;
}

this.instances.forEach(function (instance) {
_this3.computeScrollOffsets(instance);
_this4.computeScrollOffsets(instance);

if (updatedProps) {
// eslint-disable-next-line no-unused-vars
Expand Down
Loading

0 comments on commit f8de58c

Please sign in to comment.