Skip to content

Commit

Permalink
app: don't calculate scrollTop anymore
Browse files Browse the repository at this point in the history
Needs more logic to make it work as expected
  • Loading branch information
evanlucas committed Apr 1, 2016
1 parent 3e8dfa6 commit 945ef73
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,13 @@ function App(el, currentWindow) {
if (this.activeModel.ele) {
const ele = document.querySelector(this.activeModel.ele)
if (ele) {
if (ele.scrollHeight - ele.clientHeight <= ele.scrollTop + 1) {
ele.scrollTop = ele.scrollHeight
}
// TODO(evanlucas) Fix this so it auto scrolls only
// if we are not already scrolling
//
// if (ele.scrollHeight - ele.clientHeight <= ele.scrollTop + 1) {
// ele.scrollTop = ele.scrollHeight
// }
ele.scrollTop = 0
}
} else if (this.activeModel instanceof Settings) {
const ele = document.querySelector('.settings-container')
Expand Down

0 comments on commit 945ef73

Please sign in to comment.