Skip to content

Page jumping on footer refresh with dynamic content #56

@3hree6ixty5ive

Description

@3hree6ixty5ive

FIrst I just want to say that I love this plugin, however I have been having an issue which makes it a bit diffucult to use. When a virtual footer contains some sort of dynamic content, like an embedded Base, and the "Refresh on Focus Change" is enabled, there is significant page jumping when focus returns to the note.

It is a little hard to explain, but when the note is long enough to scroll off the page, if you click out and back into focus of the note, it will immediately jump (scroll) back up the page, moving the footer off the bottom and requiring you to scroll back down to get your cursor and the footer back onto the page.

To explain more, this can be replicated in a sandbox vault using the following steps:

  1. The inital "Start Here" note is long enough to replicate the issue, so this is the note you want to add a footer too.
  2. Create a blank file called "Footer" to be used as the virtual content source
  3. Create a new Obsidian Base
  4. Go back to the Footer note, and embed the new Base, ![[Untitled.base]]
  5. In settings, add the virtual content plugin, and enable "Refresh on Focus Change"
  6. Set the default rule to apply to all files in folder "/"
  7. Set the content source to mardown file, and choose "Footer.md"
  8. Return to the "Start Here" note and scroll past the bottom, so that the embedded base covers half the screen.
  9. Click somewhere outside of the note, like on the file explorer to the left, then click back on the end of the note, just above the embedded footer.
  10. Repeat the clicking out and in, scrolling down each time to move the cursor to the middle of the page

This should cause the same issue, where every time you click back in, it willl scroll the whole embedded footer off the bottom of the screen.

This also occurs on mobile, to an even worse degree, as swiping in and then out one of the side panels will cause the jump every time, moving the bottom of the note completely off the screen making you have to scroll back down to continue editing.

I'm sorry for such a long Issue submission but hopefully it makes the error easier to replicate. Thank you again for this plugin, it is amazing!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions