minor improvement to test dialog
Handled backspace and escape in popup_prompt