fix keypress to edit todo item bug