As you can see in the documentation of CreateDialog
:
If the dialog contains no
DefaultButton
orCancelButton
, pressing Enter or Esc will close the dialog without taking any other action.In dialogs created with
CreateDialog
, pressing Enter is effectively equivalent to clicking theDefaultButton
, and Esc to clicking theCancelButton
.
For example I have an InputField
, but when I press Esc key to write any expression, the dialog closes.
I'm trying with the fuction:
CreateDialog[Overlay[{DefaultButton[], CancelButton[], InputField[]},{3}, 3]]
But it does not work.
How can change this behavior in Dialog?