Editor.scrollTo() not working in Reading View

The scrollTo method is not working in Reading Mode on desktop (macOS) or mobile (iPadOS) as expected. I have a simple plugin that responds to Page Up / Down events, which is working in Live Preview and Source mode, but the Reading View does not scroll. Is this a known issue?

Obsidian Desktop version: 1.9.5

Editor is for Editing view as the name suggests. Reading view is governed by this class: MarkdownPreviewView - Developer Documentation

However in your use case, I guess the standard Web API is enough, for example

1 Like

Thanks for the pointers! The standard methods are not responding on MarkdownPreviewView.containerEl. Is there a different element that I should try to access?

I think its child element, .markdown-preview-view

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.