Skip to content

Commit

Permalink
fix: [BUG] code block expanding/collapsing won't work well in non-fir…
Browse files Browse the repository at this point in the history
…st Shortcode tabs/tab.

Fixes #1406
  • Loading branch information
lvliangxiong committed Dec 20, 2024
1 parent d3d5fe2 commit 3fee407
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions assets/js/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,6 @@ function initCodeblocks() {
"button.line-number-button",
) as HTMLButtonElement;

chroma.style.maxHeight = chroma.scrollHeight + 10 + "px";

// handle expanding and collapsing code blocks
titleBar.addEventListener("click", () => {
codeBlock.classList.toggle("is-open");
Expand All @@ -917,7 +915,6 @@ function initCodeblocks() {
wrapCodeButton?.addEventListener("click", () => {
chroma.style.maxHeight = "fit-content";
codeBlock.classList.toggle("is-wrap");
chroma.style.maxHeight = chroma.scrollHeight + 10 + "px";
});

toggleLineNumbersButton.addEventListener("click", () => {
Expand Down

0 comments on commit 3fee407

Please sign in to comment.