From c691af97125846c280817b212e503e56cff34da5 Mon Sep 17 00:00:00 2001 From: Dick Choi Date: Wed, 1 Jun 2016 09:35:48 +0900 Subject: [PATCH] debug autoscroll --- browser/main/NoteList/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index 71734328..d00fd150 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -46,7 +46,7 @@ class NoteList extends React.Component { let list = this.refs.root 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) { list.scrollTop = item.offsetTop + item.clientHeight - list.clientHeight }