Skip to content

[Bug]: Calendar Month View resets scroll position to top after updating a task #1869

@sisyowo

Description

@sisyowo

Bug Description

Bug Description

Hello,

When I'm in the Calendar Month View, updating a task (e.g., clicking on a task and editing a property) causes the entire view to scroll back to the top. This forces me to manually scroll back down to where I was working, which becomes very disruptive when updating multiple tasks in sequence.

Steps to Reproduce

  1. Open the Calendar Month View.
  2. Scroll down in the calendar to a later week/day.
  3. Update any task (e.g., clicking on a task and editing a property).
  4. Observe that the view jumps back to the top of the calendar.

Expected Behavior

The calendar should remain at the same scroll position the user was at before the task update.

Actual Behavior

After each task update, the calendar view automatically scrolls back to the top.

Additional Context

A nearly identical issue occurred in the Kanban View and was fixed in #1266 (commit 5470049, released in v4.1.0), where getEphemeralState/setEphemeralState were used to preserve scroll positions during re-renders. Applying the same approach to the Calendar Month View should resolve this issue.

Plugin Version

[v4.3.0]

Obsidian Version

[v1.12.7]


Thanks for your continued work on this plugin!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions