-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] code block expanding/collapsing won't work well in non-first Shortcode tabs/tab. #1406
Comments
Yeah this is a good old CSS problem for these kind of animations. I think Chrome has a new feature that solves this easily, but it’s not available on Firefox or Safari https://developer.chrome.com/docs/css-ui/animate-to-height-auto |
I'm not familiar with css though. |
I am happy to learn more about the solution you have in mind. I don't see a small mod fixing this. |
I figure |
I just comment out theme.ts:896 and theme.ts:920 on my local device testing, code block behaves normal. But I wonder wheather it'll ruin something... |
@lvliangxiong maybe can you bring a PR and we can test it out |
It removes the expansion animation. |
ok, I just launched a quick pr for your reference. Look forward to your better solution. 🫡 |
As I said, this does not quite work, the expansion animation is removed Expected: Screen.Recording.2024-12-20.at.09.38.20.movActual: Screen.Recording.2024-12-20.at.09.38.08.mov |
Describe the bug 描述你遇到的错误
When render md file with following content:
, second tab code block expanding/collapsing won't work well when click the title bar.
But if you turn on/off the code wrap button once, the expanding/collapsing function becomes normal.
Look like
chroma.style.maxHeight = chroma.scrollHeight + 10 + "px";
in theme.ts:896 failed to get scrollHeight for code blocks in other tabs. So it's limited to 10px.Expected behavior 期待的行为
Code block expand/collapse normally.
Screenshots 屏幕截图
No response
Build Environment 构建环境
Preview Environment 预览环境
Additional Information 补充信息
No response
The text was updated successfully, but these errors were encountered: