Question

I need to use the ESC key to close a modal in my application that is built with the Chrome Embedded Framework but it is disabled by default.

Is there a way to activate it?

CEF is embedded in a Delphi application. The front end is being implemented with AngularJS and jQuery.

Was it helpful?

Solution

If the modal dialog is of the alert() type, you cannot bind ESC key in JavaScript. On the other hand, if the modal dialog is opened by a jQuery plugin (like this one), please see this answer. You can also hijack window.alert. However, if you cannot modify JavaScript code, you are left with intercepting the modal dialog within Delphi (which I am not familiar with)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top