chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.28k stars 456 forks source link

CefJSDialogHandler - OnDialogClosed not fired for default dialogs. #3622

Closed CristianVignoli closed 9 months ago

CristianVignoli commented 9 months ago

Hi, I implemented the CefJSDialogHandler interface to handle events related to JavaScript dialogs.

The OnJSDialog event is correctly fired as expected every time a dialog is opening. This would suggest me that I have implemented the interface correctly.

Now:

Am I missing something? Is this the expected behavior? In this case, is there any possibility to attach an event to a default implementation dialog closure?

Versions

Please, let me know if I can supply any additional information.

magreenblatt commented 9 months ago

If false is returned from the OnJSDialog event (using the default implementation of the dialog), the OnDialogClosed event is NOT fired at all when the dialog is closed due to a user gesture or whatever.

This is expected behavior.

is there any possibility to attach an event to a default implementation dialog closure?

JavaScript execution is paused while the dialog is displayed and continues after the dialog is closed.