Allow creation of tags when autocomplete menu is open

Commit d416408c1d43c783f7145abb244957da1ba31f44 causes a regression where one is unable to create tags when the autocomplete menu is open. That commit really only needs to apply when autoFocus is enabled, so this commit limits it to that situation. Also close the autocomplete menu when creating a tag.