roadlabs / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

javascript window.close in MDI app closes not only MDI child but whole app #1558

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create MDI application with child window containing CEF browser
2. open page in child MDI which conatains javascript code window.close()
3. click the url with onclick handler or execute javascript - the application 
quits.

What is the expected output? What do you see instead?

closes only the child window

What version of the product are you using? On what operating system?

CEF3.2171.1979 in delphi 7, windows xp 32bit sp3

Please provide any additional information below.

when migrated from CEF3.1750.1805 the problem appeared.
the onBrowserClose handler was called in both versions, but in the last version 
the main application window closes also :(

Original issue reported on code.google.com by kyrm...@gmail.com on 1 Mar 2015 at 5:14

GoogleCodeExporter commented 9 years ago
This is not a support channel for the Delphi wrapper.

Original comment by magreenb...@gmail.com on 2 Mar 2015 at 4:57

GoogleCodeExporter commented 9 years ago
it is not fault of the wrapper I swear

Original comment by kyrm...@gmail.com on 2 Mar 2015 at 5:34

GoogleCodeExporter commented 9 years ago
In C/C++ you can implement the CefLifeSpanHandler::DoClose() method to control 
how the browser is closed. See the documentation on that method for usage.

Original comment by magreenb...@gmail.com on 2 Mar 2015 at 5:36

GoogleCodeExporter commented 9 years ago
I already used onBrowseClose event that is provided by wrapper.
then I tryed not to use the bundled wrapper component, but do all the things by 
myself - create cef window with api and handle all the events.
ok, it's called when the child window with browser closes.
but then the main app window too, because I suppose cef window sends some sort 
of message to it (wm_quit maybe).

Original comment by kyrm...@gmail.com on 2 Mar 2015 at 5:43