Use case or problem
In Obsidian v.1.6.7, if you are editing a document then go to search the vault by first clearing existing search terms via the “x” icon (“clear search”), the focus is left in the editing pane. As a result, typing new search terms immediately after clearing the search field this way erroneously places text in the document rather than in the search field.
Note that in earlier versions of Obsidian, the focus was transferred to the search field on clearing it this way.
Proposed solution
Clicking the “x” to “clear search” in the search field of the Vault Search tab should transfer focus to the search field. This way, successive typing would enter text in the search field rather than the document.
Current workaround (optional)
Click the “clear search” “x”, then click inside the search field to transfer focus to the search field. This requires two user interactions rather than one. Presumably, the only time you would clear the search field is when you intend to enter fresh search terms.
Related feature requests (optional)
None were found on a search of the existing Forum posts, either as a feature request or a bug report.
The closest item on the forum is about focus management when clicking the search icon (as opposed to clicking the clear search “x”): Search text field does not autofocus with click on search icon