cefclient does not close on window.close

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

cefclient does not close on window.close

Postby renoi » Thu Jun 05, 2025 4:17 pm

Hello, is there any workaround to close browser when window.close() is called in script. This was working in v89 but not anymore in v130.
Referring to https://github.com/chromiumembedded/cef/issues/3761 tried the --use-alloy-style and --use-native but no luck.
OnBeforeClose is called but not DoClose.
Any workaround suggestions please.
renoi
Newbie
 
Posts: 4
Joined: Tue May 28, 2024 10:47 am

Re: cefclient does not close on window.close

Postby ssaraf » Tue Jun 24, 2025 5:27 am

Hi, is there any workaround to close browser using window.close() with chrome runtime? Closing is not working with chrome runtime which creates issue with new window creation.
ssaraf
Mentor
 
Posts: 81
Joined: Mon Nov 09, 2020 2:18 am

Re: cefclient does not close on window.close

Postby magreenblatt » Tue Jun 24, 2025 9:09 am

What kind of window are you trying to close? window.close() should work currently for popup windows.
magreenblatt
Site Admin
 
Posts: 13059
Joined: Fri May 29, 2009 6:57 pm

Re: cefclient does not close on window.close

Postby ssaraf » Tue Jun 24, 2025 11:35 pm

popup window opened using window.open(), if same is closed using window.close() it doesnt close instead shows black screen
ssaraf
Mentor
 
Posts: 81
Joined: Mon Nov 09, 2020 2:18 am

Re: cefclient does not close on window.close

Postby magreenblatt » Wed Jun 25, 2025 11:33 am

window.close() of a cefclient popup works for me in M137 with both "--use-alloy-style" and "--use-native"
magreenblatt
Site Admin
 
Posts: 13059
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 65 guests

cron