fixing adding a new task without enter keypress