Skip to content

Commit

Permalink
Fix for vertically scrollable containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Amphiluke committed Oct 31, 2018
1 parent 02fc993 commit 64c8610
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/jquery.floatingscroll.es6.min.js

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

4 changes: 2 additions & 2 deletions dist/jquery.floatingscroll.min.js

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

2 changes: 1 addition & 1 deletion floating-scroll.jquery.json
@@ -1,7 +1,7 @@
{
"name": "floating-scroll",
"title": "floatingScroll",
"version": "3.0.3",
"version": "3.0.4",
"description": "A lightweight jQuery plugin providing floating scrollbar functionality",
"keywords": [
"scrollbar",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "floating-scroll",
"version": "3.0.3",
"version": "3.0.4",
"description": "A lightweight jQuery plugin providing floating scrollbar functionality",
"main": "dist/jquery.floatingscroll.min.js",
"module": "src/jquery.floatingscroll.js",
Expand Down
4 changes: 2 additions & 2 deletions src/jquery.floatingscroll.js
Expand Up @@ -11,7 +11,7 @@ let floatingScrollProto = {
instance.visible = true;
instance.initWidget();
instance.updateAPI(); // recalculate scrollbar parameters and set its visibility
instance.syncWidget(instance.container);
instance.syncWidget();
instance.addEventHandlers();
},

Expand Down Expand Up @@ -118,7 +118,7 @@ let floatingScrollProto = {
updateAPI() {
let instance = this;
let {widget, container, scrollBody} = instance;
widget.width($(container).outerWidth());
widget.width(container.clientWidth);
if (!scrollBody) {
widget.css("left", `${container.getBoundingClientRect().left}px`);
}
Expand Down

0 comments on commit 64c8610

Please sign in to comment.