mayurankv / Obsidian-Code-Styler

A plugin for Obsidian.md for styling codeblocks and inline code
Other
239 stars 6 forks source link

Bug: In reading mode, folding from uncollapsed to collapsed, but interrupting the fold by unfolding causes a non-smooth transition #65

Open mayurankv opened 1 year ago

mayurankv commented 1 year ago

Describe the bug

In reading mode, folding from uncollapsed to collapsed, but interrupting the fold by unfolding causes a non-smooth transition

Steps to reproduce

Press on the header when uncollapsed and before fully collapsed, click it again - the unfold will be instant, not transitioned.

```lang
line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8


### Expected behaviour
<!-- A clear and concise description of what you expected to happen. -->
Fold should be smooth.

### Current behaviour
<!-- A clear and concise description of what currently happens.  -->
Fold is not smooth

### Environment
<!-- Details of your environment -->
- Plugin Version: 1.0.4
- Obsidian Version:  1.3.7
- Platform:  Desktop
- OS:  macOS
<!-- Other details that you think may affect this issue -->

### Screenshots
<!-- Provide screenshots here if relevant. -->

### Additional context
<!-- Add any other context about the problem here. Are there any console errors? -->
mayurankv commented 1 year ago

Could be fixed by using a setTimeout for removing max-height at the end of transitions that can be reset (instead of await sleep()). However, one instance of this timer needs to be globally accessible to the eventHandler function.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 60 days with no activity.