Menu: Typeahead now accounts for leading whitespace

Fixes #10649
Closes gh-1356