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:
parent
a33f602f3b
commit
a7aed1f93a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user