Skip to content

Commit

Permalink
Prevent scrollbar from occasionally showing up after expanding code b…
Browse files Browse the repository at this point in the history
…lock (#207)
  • Loading branch information
stefano-ottolenghi authored Dec 22, 2023
1 parent 1b266b8 commit 0ea4eda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/06-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ document.addEventListener('DOMContentLoaded', function () {
var code = pre.querySelector('code')
var showMore = pre.querySelector('div.show-more')

pre.style.maxHeight = pre.scrollHeight + 'px'
pre.style.maxHeight = ''
pre.style.overflow = ''
pre.style.cursor = ''
code.style.webkitMaskImage = ''
Expand Down

0 comments on commit 0ea4eda

Please sign in to comment.