I’m closing the search bar because I don’t need it any more, or it’s in the way, so I expect it to disappear without affecting my scroll position or my cursor.
Actual result
I am forcibly scrolled back to a search result, and my cursor is moved there as well.
Environment
SYSTEM INFO:
Obsidian version: v1.4.13
Installer version: v1.4.5
Operating system: Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:53 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020 22.6.0
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
I don’t believe that – there’s just no sane rationale for wanting that behavior. My guess is that when you close it, it briefly gets the focus, and when it has the focus, it highlights and scrolls to the search result. The second half of that is intended I’m sure, but the fact that it also happens when you’re just closing the search bar is IMO very unlikely to be intended. Maybe highlighting and scrolling should only happen when the text input is focused, rather than the whole search bar element?