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