"Insert template" in separate window scrolls to top

Steps to reproduce

In sandbox vault:

  1. Make a folder and set it as the template folder location in Settings > Templates.
  2. Make 2 non-blank templates.
  3. Navigate to a page other than “Start Here”, open "Start Here’ in a new window, and place cursor at the bottom of the page.
  4. Use Command Palette > Templates: Insert template and select a template.

Expected result

  • Template content is inserted.
  • Scroll position doesn’t change unless needed to accommodate the new text.

Actual result

  • Template content is inserted.
  • Page scrolls to top.
  • Cursor remains at end of inserted text. Typing any key will scroll most (but in my test, not all) of the way down to it.

Environment

  • Operating system: MacOS 12.5
  • Debug info:

Sandbox vault

SYSTEM INFO:
Obsidian version: v0.15.8
Installer version: v0.15.6
Operating system: Darwin Kernel Version 21.6.0: Sat Jun 18 17:05:47 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T8101 21.6.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

My vault

SYSTEM INFO:
Obsidian version: v0.15.8
Installer version: v0.15.6
Operating system: Darwin Kernel Version 21.6.0: Sat Jun 18 17:05:47 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T8101 21.6.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: Minimal
Snippets enabled: 3
Restricted mode: off
Plugins installed: 48
Plugins enabled: 29
1: Calendar v1.5.10
2: Periodic Notes v0.0.17
3: Folder Note Core v1.3.5
4: Shortcut Launcher v1.0.1
5: Regex Find/Replace v1.2.0
6: Plaintext v0.1.0
7: Quick Explorer v0.1.32
8: Reveal Active File Button v2.0.1
9: Style Settings v0.4.10
10: Pane Relief v0.2.4
11: Kanban v1.3.10
12: Smart Random Note v0.2.1
13: Customizable Sidebar v2.2.1
14: Smart Typography v1.0.18
15: Auto Note Mover v1.2.0
16: Collapse All v1.5.2
17: Tag Wrangler v0.5.3
18: Quiet Outline v0.3.2
19: Omnisearch v1.5.0-beta3
20: Maximise Active Pane v0.0.3
21: Obsidian42 - BRAT v0.6.34
22: Sort & Permute lines v0.5.1
23: Hotkeys for starred files and searches v0.0.4
24: Advanced Mobile Toolbar v1.7.7
25: Waypoint v1.2.0
26: Advanced URI v1.24.0
27: QuickAdd v0.5.5
28: Natural Language Dates v0.6.1
29: Minimal Theme Settings v5.3.2

RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

The behavior also appears if using a hotkey instead of the Command Palette. I didn’t try the sidebar button because the window had no sidebar.

With only 1 template in the templates folder:

  • The text is inserted without a template selection pop-up.
  • The page doesn’t scroll to the top.
1 Like

does it happen in sandbox vault?

Yes, per the steps to reproduce.