Fix annoying bug on add key dialog. When "add" or "save" button was clicked, the page would scroll up and focus
on the key-name text input, without triggering the click event.