When creating/editing password - lock the keyboard arrow keys to the edited box only - otherwise edits are lost

When creating new password and editing (specifically I was typing into custom field I created called Notes), when I accidentally press arrow up and down keys on keyboard, it would cancel the edit and navigate the left pane list of passwords and switch to another note.
In the process of this I am loosing my edits I have done for the new password. When I go back to continue, the password fields are blank.