1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixed scrolling issue

This commit is contained in:
Laurent Cozic 2019-01-30 17:35:41 +00:00
parent a33f602f3b
commit a7aed1f93a

View File

@ -60,9 +60,11 @@ class ItemList extends React.Component {
if (itemIndex < top) {
scrollTop = this.props.itemHeight * itemIndex;
} else {
scrollTop = this.props.itemHeight * itemIndex - this.visibleItemCount();
scrollTop = this.props.itemHeight * itemIndex - (this.visibleItemCount() - 1) * this.props.itemHeight;
}
if (scrollTop < 0) scrollTop = 0;
this.scrollTop_ = scrollTop;
this.listRef.current.scrollTop = scrollTop;