Swapped placement of save and cancel buttons.
Fixed key event code for Firefox.