From 92ca78709227c6117797c52eada7d471bb4ba96a Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Wed, 05 Jul 2023 01:26:11 +0000
Subject: [PATCH] fix default callout state

---
 quartz/components/scripts/callout.inline.ts |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/quartz/components/scripts/callout.inline.ts b/quartz/components/scripts/callout.inline.ts
index 081a5a2..c13571a 100644
--- a/quartz/components/scripts/callout.inline.ts
+++ b/quartz/components/scripts/callout.inline.ts
@@ -1,7 +1,7 @@
 function toggleCallout(this: HTMLElement) {
   const outerBlock = this.parentElement!
-  this.classList.toggle(`is-collapsed`)
-  const collapsed = this.classList.contains(`is-collapsed`)
+  outerBlock.classList.toggle(`is-collapsed`)
+  const collapsed = outerBlock.classList.contains(`is-collapsed`)
   const height = collapsed ? this.scrollHeight : outerBlock.scrollHeight
   outerBlock.style.maxHeight = height + `px`
 }

--
Gitblit v1.10.0