-
Notifications
You must be signed in to change notification settings - Fork 34
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
Scrollbar recalculation does always move scrollbar to the top #84
Comments
@crudo1f yes, nice find... Do you have the ability to take a look at it perchance? |
@alexander-alvarez sorry for the late reply. I am not able to look into that the upcoming weeks because of holidays. In case this remains open I will try to take care of it afterwards. |
I came across this issue in my project when I try to restore an It seems that instead of hardcoding this value as zero: It should be using the current |
@alexander-alvarez @crudo1f I tried the solution in my previous comment by overriding the createScrollbar() {
if (this.get('isDestroyed')) {
return [];
}
const scrollbars = [];
this.resizeScrollContent();
if (this.get('vertical')) {
const verticalScrollbar = new Vertical({
scrollbarElement: this.$(`${scrollbarSelector}.vertical`),
contentElement: this._contentElement
});
this.set('verticalScrollbar', verticalScrollbar);
this.updateScrollbarAndSetupProperties(this.get('scrollToY'), 'vertical');
scrollbars.push(verticalScrollbar);
}
if (this.get('horizontal')) {
const horizontalScrollbar = new Horizontal({
scrollbarElement: this.$(`${scrollbarSelector}.horizontal`),
contentElement: this._contentElement
});
this.set('horizontalScrollbar', horizontalScrollbar);
this.updateScrollbarAndSetupProperties(this.get('scrollToX'), 'horizontal');
scrollbars.push(horizontalScrollbar);
}
return scrollbars;
} |
@billdami this is in line with what I was expecting. |
@alexander-alvarez sounds good! 👍 |
In case of calling the update() or recalculate() action the scrollbar is not only resized it is always moved to the top. This happens on resizing the page as well.
The text was updated successfully, but these errors were encountered: