Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using stickToBottom and alwaysShowVScroll it does not start by sticking #372

Open
skamsie opened this issue Jan 23, 2020 · 5 comments

Comments

@skamsie
Copy link

skamsie commented Jan 23, 2020

When using the settings alwaysShowVScroll: true and stickToBottom: true and the content is dynamically loaded, I would expect it to remain stuck at bottom when the height of the content becomes higher than the height of the element. However this does not happen. The slider is at the bottom in the beginning, but it starts raising as soon as the content starts to overflow. You have to scroll to bottom once to get the desired behavior.

How to test. In this demo file: https://github.com/vitch/jScrollPane/blob/master/examples/dynamic_content.html replace the settings with:

var settings = {
  showArrows: true,
  alwaysShowVScroll: true,
  stickToBottom: true
};
@illuusio
Copy link
Collaborator

Ok have looked source what is causing this?

@skamsie
Copy link
Author

skamsie commented Feb 6, 2020

@illuusio I have added information on how to reproduce it... Not sure what I can provide more. You can use the example file in the repository
https://github.com/vitch/jScrollPane/blob/master/examples/dynamic_content.html

but replace settings here with

var settings = {
  showArrows: true,
  alwaysShowVScroll: true,
  stickToBottom: true
};

@skamsie
Copy link
Author

skamsie commented Feb 6, 2020

Never mind, I see it is related to this 8 years old bug: #125

@illuusio
Copy link
Collaborator

illuusio commented Feb 6, 2020

It seems so. I got to find time to fix this in near future but my timeline for working on this is very limited. So providing Pull Request (PR) would make fixing much faster.

illuusio added a commit that referenced this issue Jun 25, 2020
…ottom and you have to turn off maintainposition if you like to use it
@illuusio
Copy link
Collaborator

Ok this should be fixed but not as nicely as I like it. Have to stick it to new resizer to make it work as people want.
You have to set

var settings = {
  showArrows: true,
  maintainPosition: false,
  alwaysShowVScroll: true,
  stickToBottom: true
};

Then it always stick to bottom. If you need to maintainPosition you have to turn it on after you have enough stuff in table as if this chat or something then it always jumps to bottom when reinitialize()-function is called if maintainPosition if not set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants