Skip to content

fix(theme): ensure correct outline state - #2189

Closed
microdev1 wants to merge 1 commit into
vuejs:mainfrom
microdev1:outline
Closed

fix(theme): ensure correct outline state#2189
microdev1 wants to merge 1 commit into
vuejs:mainfrom
microdev1:outline

Conversation

@microdev1

Copy link
Copy Markdown

Fixes a couple of edge cases in outline:

  • The first outline link remains active when content is scrolled back to top.
  • The state is incorrect when isAsideEnabled becomes true after being set to false and the content was scrolled/updated.

Background changes:

  • Use onContentUpdated instead of onUpdated as the later is triggered twice.
  • Calculate anchors only when the content is updated or isAsideEnabled becomes true.
  • Remove scroll listener when the content has outline disabled or isAsideEnabled becomes false.

@brc-dd
brc-dd force-pushed the main branch 2 times, most recently from 7ad4a4e to f0d3082 Compare August 3, 2023 10:20
@github-actions github-actions Bot added the stale label Nov 6, 2023
@github-actions github-actions Bot removed the stale label Nov 25, 2023
@github-actions github-actions Bot added the stale label Feb 2, 2024
@github-actions github-actions Bot removed the stale label Apr 28, 2024
@github-actions github-actions Bot added the stale label Jun 9, 2024
@github-actions github-actions Bot removed the stale label Jul 17, 2024
@github-actions github-actions Bot added the stale label Sep 1, 2024
@brc-dd
brc-dd force-pushed the main branch 2 times, most recently from c5a8428 to 8abbe29 Compare August 14, 2025 03:45
@brc-dd
brc-dd force-pushed the main branch 2 times, most recently from 084cf43 to d3a1567 Compare August 20, 2025 14:41
@brc-dd brc-dd removed the stale label Jan 31, 2026
@brc-dd
brc-dd force-pushed the main branch 3 times, most recently from 15a0278 to 09af6c7 Compare March 26, 2026 04:26
@bluwy

bluwy commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

This PR is quite old, but I think most of the issue explained is now fixed.

@bluwy bluwy closed this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants