Skip to content

Commit

Permalink
fix(console): safari bounce effect
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Apr 28, 2020
1 parent 488f382 commit 1fe4dac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Console/Logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,10 @@ export default class Logger extends Emitter {
}

const { scrollHeight, offsetHeight, scrollTop } = this._container
// safari bounce effect
if (scrollTop < 0) return
if (offsetHeight + scrollTop > scrollHeight) return

let isAtBottom = false
if (scrollHeight === offsetHeight) {
isAtBottom = true
Expand Down

0 comments on commit 1fe4dac

Please sign in to comment.