Prevent Editor modal from closing on escape key
Prevent Editor modal from closing on escape key
Hello! The default behavior for the "create" modal is to close when the escape key is pressed. How can I disable this behavior?
The jQuery event passed to preClose isn't the keypress but rather an instance of the preClose event, so I can't detect that was the event which triggered the preClose and return the cancellation.
I know I could intercept the keystroke and prevent it from propagating to dt but I strongly suspect it's just a configuration option I'm missing.
Thanks!
This question has an accepted answers - jump to answer
Answers
Update: I found the solution in the formOptions.main setting. The solution was to set
formOptions.main.onEsc
to false on Editor initialization.Hi,
Thanks for posting back. You are absolutely spot on - this is the way to control that behaviour.
Allan