refactor event handler 'enter-new-todo'