mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
debug autoscroll
This commit is contained in:
@@ -46,7 +46,7 @@ class NoteList extends React.Component {
|
|||||||
let list = this.refs.root
|
let list = this.refs.root
|
||||||
let item = list.childNodes[targetIndex]
|
let item = list.childNodes[targetIndex]
|
||||||
|
|
||||||
let overflowBelow = list.clientHeight + list.scrollTop < item.offsetTop + list.clientHeight
|
let overflowBelow = item.offsetTop + item.clientHeight - list.clientHeight - list.scrollTop > 0
|
||||||
if (overflowBelow) {
|
if (overflowBelow) {
|
||||||
list.scrollTop = item.offsetTop + item.clientHeight - list.clientHeight
|
list.scrollTop = item.offsetTop + item.clientHeight - list.clientHeight
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user