JS dialogs default impl doesn't work in alloy runtime style

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.

JS dialogs default impl doesn't work in alloy runtime style

Postby Czarek » Mon Nov 11, 2024 2:58 pm

Is it supposed to work by default? From OnJSDialog docs it seems it should work:

Code: Select all
Set |suppress_message| to false and return false to use the default implementation

But it doesn't work for me.

OS: Windows 10.
CEF version: 130.1.15+g34b05bb+chromium-130.0.6723.92
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1943
Joined: Sun Nov 06, 2011 2:12 am

Re: JS dialogs default impl doesn't work in alloy runtime st

Postby Czarek » Mon Nov 11, 2024 3:05 pm

Just tested with cefclient with alloy style:
Code: Select all
cefclient.exe --use-alloy-style

And JS dialogs don't work.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1943
Joined: Sun Nov 06, 2011 2:12 am

Re: JS dialogs default impl doesn't work in alloy runtime st

Postby Czarek » Mon Nov 11, 2024 3:09 pm

With chrome style JS dialogs also don't work:
Code: Select all
cefclient.exe --use-chrome-style-window
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1943
Joined: Sun Nov 06, 2011 2:12 am

Re: JS dialogs default impl doesn't work in alloy runtime st

Postby Czarek » Mon Nov 11, 2024 3:20 pm

This is craaaazy. Sometimes JS dialogs work and other times they do not. I am talking about alert/confirm/prompt.

Another strange thing is that sometimes when it doesn't work I launch another instance of cefclient and then the js alert appears at that exact moment in the previous app. Only after launching another instance of app.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1943
Joined: Sun Nov 06, 2011 2:12 am

Re: JS dialogs default impl doesn't work in alloy runtime st

Postby Czarek » Mon Nov 11, 2024 3:29 pm

In "cefclient > Other tests > Dialogs" when js dialogs don't work I reload the page, confirm leaving the page. And after that I press "Show confirm" button and dialog doesn't appear, but I see that "console.log" file adds this warning:
Code: Select all
Level: Warn

Message: A window.confirm() dialog generated by this page was suppressed because this page is not the active tab of the front window. Please make sure your dialogs are triggered by user interactions to avoid this situation. https://www.chromestatus.com/feature/5140698722467840

Source: https://tests/dialogs

Line: 0

-----------------------

It starts adding these warnings when pressing only after I reloaded page. Alert/confirm/prompt don't work at all while testing that session even before reload.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1943
Joined: Sun Nov 06, 2011 2:12 am

Re: JS dialogs default impl doesn't work in alloy runtime st

Postby magreenblatt » Mon Nov 11, 2024 3:31 pm

magreenblatt
Site Admin
 
Posts: 12810
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 67 guests