Skip to content

Commit

Permalink
IDE: ensure (yet again) that the console scrolls following new data i…
Browse files Browse the repository at this point in the history
…f it is already at the bottom.

The === was off by 0.5. Now added a bit of tolerance in there, to stay on the safe side
  • Loading branch information
giuliomoro committed Apr 9, 2022
1 parent 59a86f2 commit 1ddb81c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion IDE/frontend-dev/src/console.js
Expand Up @@ -215,7 +215,7 @@ class Console extends EventEmitter {
}

checkScroll(){
if (this.parent.scrollHeight-this.parent.scrollTop === this.parent.clientHeight){
if (Math.abs(this.parent.scrollHeight - this.parent.scrollTop - this.parent.clientHeight) < 3){
scrollEnabled = true;
} else {
scrollEnabled = false;
Expand Down
2 changes: 1 addition & 1 deletion IDE/public/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ddb81c

Please sign in to comment.