Added context menu action and hiding dialog on press Esc