Added ESC key handler for JS popup