Skip to content

Commit

Permalink
Reset native scrollbar when hiding it
Browse files Browse the repository at this point in the history
To avoid it reinitializing in a scrolled position on Chrome

Issue #6819
  • Loading branch information
marijnh committed Nov 10, 2021
1 parent f9826b4 commit aabc6dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/display/scrollbars.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class NativeScrollbars {
this.vert.firstChild.style.height =
Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"
} else {
this.vert.scrollTop = 0
this.vert.style.display = ""
this.vert.firstChild.style.height = "0"
}
Expand Down

0 comments on commit aabc6dd

Please sign in to comment.