closeOnEscape : booleanDefault: true

Specifies whether the dialog should close when it has focus and the user presses the escape (ESC) key.

Examples

True

    
 <div id="dialog">Lorem ipsum dolor sit amet, consectetur adipiscing elit...</div>
 <script>
     $("#dialog").dialog({
         closeOnEscape: true
     });
 </script>

  

False

    
 <div id="dialog" style="display: none">Lorem ipsum dolor sit amet, consectetur adipiscing elit...</div>
 <script>
     $("#dialog").dialog({
         closeOnEscape: false
     });
 </script>