added event handlers for escape dialog
added event handlers for escape dialog