fix(callouts): When there are two or more nested callouts, the max-height of the parent callout may be incorrect when expanded. #1233
+10
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Official website example)[https://quartz.jzhao.xyz/features/callouts#:~:text=Yes!%2C%20they%20can.%20And%20collapsed!]
When clicking "Can callouts be nested?" twice and then clicking on its child callout, the max-height of [!question] does not change correctly. (I also tested this locally, and it's the same.)
Reason: After a child callout is interacted with, it will traverse up the entire callout tree from the current callout being operated on to update the max-height of all parent callouts, but it fails to traverse correctly. The child callout is located one level below the
callout-content
, not directly below thecallout
.