up and down arrows now jump across word/tag inputs
refactoring: code responsible for navigating with up and down arrows moved to a separate function