Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chrome Runtime] Impossible to use window.open during page load #3785

Closed
max3163 opened this issue Sep 6, 2024 · 7 comments
Closed

[Chrome Runtime] Impossible to use window.open during page load #3785

max3163 opened this issue Sep 6, 2024 · 7 comments
Labels
bug Bug report

Comments

@max3163
Copy link

max3163 commented Sep 6, 2024

Describe the bug

With the Chrome Runtime, when I try to make a window.open during the load of a page, it doesn't work for 5-15 seconds.

To Reproduce

Start load this page :


<!DOCTYPE html>
<html lang="en">
  <head>

  </head>
  <body>
    <script>
      let count = 0;
      function openWindowRec() {
        console.log("Try window.open : " + count );
        if (!window.open('', 'ID321')) {
          setTimeout(() => {
            count++;
            openWindowRec();
          }, 500)
        }
      }
      console.log("First call openWindowRec" );
      openWindowRec();
    </script>
  </body>
</html>

Expected behavior

The same behaviour of the ALLOY Runtime, the open.window work on the first call and enter in the OnBeforePopup method...

Versions (please complete the following information):

  • OS: Windows 10
  • CEF Version: 126 and later ( Usine CefSharp )

Additional context

No problem with Chrome.

@vav-dev
Copy link

vav-dev commented Sep 6, 2024

Same problem here with CefSharp Winform: window.open() does not work immediately in the page loading.

Only work around is to use the legacy Alloy bootstrap

@max3163
Copy link
Author

max3163 commented Sep 13, 2024

Any news about this issues ? Don't hesite if you have problem to reproduct it.

It's a blocking ticket for me.

@max3163
Copy link
Author

max3163 commented Sep 25, 2024

I'm just trying the 128 release, and the problem is still here ...

image

1-2sec before you can call the method....

When I use the ALLOW, it work on the first call as expected :

image

I use CefSharp to test the problem ( with the minimal project CefSharp.MinimalExample ) ( no custom code ).
I first open a ticket on this project but they closed it and asked to open a new one on CEF project because the Runtime is handle by CEF project.

Pls, someone can help us ????

@Sangarane
Copy link

Same problem here !

@max3163
Copy link
Author

max3163 commented Sep 25, 2024

I note, on google chrome it work perfectly

image

@max3163
Copy link
Author

max3163 commented Sep 27, 2024

Ok, I've made a test with the CefClient Sample Application and it work ....

So the problem is on CefSharp ....

@max3163 max3163 closed this as completed Sep 27, 2024
@amaitland
Copy link
Contributor

I believe the solution was to disable the popup blocker. More details at cefsharp/CefSharp#4940 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

4 participants