Fix arrow keys behavior on empty inputs