Steps to reproduce
Two related scenarios for this bug report:
First: Error being reported in the dev console:
- Open the developer console
- Open the quick switcher
- Press spacebar to input a single space character into the quick switcher
Expected result
No errors reported in the dev console
Actual result
The error Uncaught TypeError: Cannot read property '0' of undefined will be printed in the dev console. The error will be printed for each additional space character inserted.
Second: incorrect suggestions returned from quick switcher
- Open the quick switcher
- Input a single space character, followed by a single letter character. For example
t to get suggestions for filenames that start with the letter “t”
- Once the suggestions for files beginning with the single character (“t”) are displayed, delete the single letter (“t”), but leave the space character
Expected result
Expected the suggestions for filenames that begin with “t” to have been cleared.
Actual result
The suggestions are not cleared after deleting the “t”. Suggestions are only cleared after removing both the “t” and the space characters.
In the screenshot below, notice that all the “t” letters are highlighted in each suggestion, but the input box only contains a single space (after deleting the t)
Environment
- Operating system: MacOS
- Obsidian version: 8.8
Additional information
Note: This also happens in LinkSuggestion widget
No Custom plugins, nor CSS