Clicking heading from outline jumps to wrong heading in Preview pane (off by one error?)

Steps to reproduce

  1. open Help vault.
  2. new note
  3. paste in the code from this gist as an example
  4. set up 2 pane view, edit on left, preview on right
  5. enable core plugin: Outline
  6. from Outline, click among the headings.

Expected result

preview pane tracks edit pane as far as jumping to the clicked heading

Actual result

Clicking on Heading 1 makes the preview jump to Heading 5. Then, clicking Heading 5 makes the preview pane jump to Heading 1. Seems like an off by one error. More obvious when watching the video below.

Environment

  • Operating system: macOS 12.2.1
  • Debug info:
	Obsidian version: v0.13.30
	Installer version: v0.13.30
	Operating system: Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101 21.3.0
	Login status: logged in
	Catalyst license: insider
	Insider build toggle: on
	Live preview: off
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 13
	Safe mode: off

Video

this is scrolling problems among linked panes. Sometimes you need two clicks to align panes.

@WhiteNoise that’s not quite what the video shows… it’s toggling back and forth between the headings exactly opposite of the one I clicked on. So, is this an upstream bug then?

0.13.31 (E17) no change

let me know if this is better when we release 0.14.

Is this still happening?

Haven’t tested it in a while. Will try on 1.3.1 and report back.

When clicking on the outline title in reading mode, the shadow effect appears on the previous title after clicking on the title, and it is not 100% like this. Is this a bug?
1726122365427-1726122234659-20240912_142218

It happens in mobile too but I can’t consistently reproduce the error.

@muuxi Does it happen with restricted mode on, default theme and restart obsidian?

If so, Can you attach a copy of the note where this happens?

It also occurs in restricted mode, default theme, and when restarting Obsidian.
1726158641656-1726158471626-1726158330431-20240913_002425
未命名.md (8.6 KB)
Most titles have this situation, only a few will be correct

SYSTEM INFO:
	Obsidian version: v1.6.7
	Installer version: v1.6.5
	Operating system: Windows 11 Pro 10.0.22631
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none