Global Search settings are reset when using command / hotkey after restart

@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):

    1. Activate the Search panel
    2. Execute a query
    3. Set sort order to Modified time (new to old)
    4. Navigate away from the search results (e.g. back to the File Explorer)
    5. Quit Obsidian
    6. Relaunch Obsidian
    7. Use the hotkey to trigger the Search function
    8. 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.

1 Like

Oh, sorry I didn’t follow the thread replies very closely, I’ll take a look and see if there’s something else happening.

Ok, I can reproduce. I have the feeling this is tied to the changes made for deferred execution.

When using the command/hotkey to invoke global search view (and global search view hasn’t been idealized already), Global Search view is initialized with ALL default parameters and nothing in the search box.

I moved this to a new thread.

1 Like

Those words are music to my ears! Happy holidays! :evergreen_tree:

Will be fixed in Obsidian 1.8.1

1 Like

After installing 1.8.1 and using it for several days, I confirm that this bug is no longer occurring. Thank you :pray:

great!