Skip to content
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

Expanding incorrect section on click #182

Open
TheMathGuyd opened this issue Jun 25, 2024 · 2 comments
Open

Expanding incorrect section on click #182

TheMathGuyd opened this issue Jun 25, 2024 · 2 comments
Labels
enhancement New feature or request solved will appear in next update

Comments

@TheMathGuyd
Copy link

Upon clicking on a heading in the quiet outline, the heading above is expanded, rather than the one clicked.
https://github.com/guopenghui/obsidian-quiet-outline/assets/85257386/771f791a-d5ec-40c3-977c-362871c66dd2

@guopenghui guopenghui added the enhancement New feature or request label Jun 25, 2024
@guopenghui
Copy link
Owner

Ok, I have kind of fixed this. (waiting 200ms -> 500ms)

There are two different events controling heighlighing and expanding——cusor position change and scroll. But when you click a heading, both event occurs. So sometimes calculating to different position results. Current strategy is, when clicking a heading, scroll event will be blocked for 500ms, so only cursor position change takes effect. But 500ms may not be a perfect choice, clicking too fast can make it lose effectiveness.

@guopenghui guopenghui added the solved will appear in next update label Jun 25, 2024
@TheMathGuyd
Copy link
Author

TheMathGuyd commented Jun 27, 2024

Thank you. Works well enough.

edit:
nvm. after 5 minutes, the behavior reverted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request solved will appear in next update
Projects
None yet
Development

No branches or pull requests

2 participants