remove SPACE keyboard shortcut and moved keyup event after dialog is visible