@WhiteNoise Here’s what I have so far:
-
There appears to be a different code path inside Obsidian for clicking the toolbar icon to open the Search pane vs. using the Hotkey. I have observed that, after a fresh launch of Obsidian, clicking the icon does not clear the previously entered query, while using the hotkey does. This may be important.
-
I have found a reliable way to repro the issue (in restricted mode, no plugins):
- Activate the Search panel
- Execute a query
- Set sort order to Modified time (new to old)
- Navigate away from the search results (e.g. back to the File Explorer)
- Quit Obsidian
- Relaunch Obsidian
- Use the hotkey to trigger the Search function
- Observe that the sort order has reverted to
alphabetical
-
I found this bit of code in app.js which I assume is directly or indirectly responsible for changing the value of the dropdown.