Menu: Typeahead not accounting for leading whitespace

Fixes #10649