From 50300baf1fb366df9ffccb507ca4f61d765e6001 Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Mon, 18 Dec 2023 16:09:20 +0100 Subject: [PATCH] Prevent scrollbar from occasionally showing up after expanding code block --- src/js/06-code.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/06-code.js b/src/js/06-code.js index e47eeb48..ad6000b4 100644 --- a/src/js/06-code.js +++ b/src/js/06-code.js @@ -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 = ''