Winform Browser Control - Popup Issue

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

Winform Browser Control - Popup Issue

Postby pjcast » Mon Sep 11, 2017 11:57 am

Posting a similar message at CefGlue Google Groups... not sure what forum is official and/or most active.
Original Post Here

I've found, using either CefWebBrowser class, that the behavior of opening popups and closing them is flawed. When opening, the new window's browser takes over the current windows browser. And when closing, the new window's browser essentially destroys the current windows browser.

I fixed the opening by (keeping the base from replacing the browser):
Code: Select all
      protected override void OnBrowserAfterCreated(CefBrowser browser)
          if (Browser == null)

And the closing by (similar as above, stop base from doing something):
Code: Select all
       protected override void OnBeforeClose()

Problem is very trivial to reproduce with CefGlue demos.. open, click the link, and watch what happens when you resize the first window.
Code: Select all

      <a href="" target="_blank">Click Me</a>

Obviously my code is kind of hacky, and doesn't fix the underlying issue in CefGlue (works fine in Cef). This problem has been around for some years now, surprised no one has seen/reported/fixed this. Thoughts?
Posts: 1
Joined: Mon Sep 11, 2017 11:45 am

Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 2 guests