MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Feature Request]: Viewing popup windows
Open
Nobody has claimed this yet.
feature request
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
This is my code:
void CWebBrowser::ShowFullScreen(const CString strFilePath)
{
if (m_pImpl->m_webView)
{
CRect rctSize;
CWnd::GetDesktopWindow()->GetWindowRect(rctSize);
rctSize.DeflateRect(10,10);
CString strJS;
strJS.Format(L"window.open('%s', 'customWindow', 'width=%d, height=%d, top=%d, left=%d')",
strFilePath.IsEmpty() ? GetLocationURL() : EncodeFilePathToUrl(strFilePath),
rctSize.Width(), rctSize.Height(), rctSize.top, rctSize.left);
m_pImpl->m_webView->ExecuteScript(strJS,
Callback<ICoreWebView2ExecuteScriptCompletedHandler>(
[](HRESULT error, PCWSTR result) -> HRESULT { return S_OK; })
.Get());
}
}
It works fine but:
- The maximized popup window is modeless. So i can still independently use my app. Ideally it should be modal.
- If I shut my app down (and thus webview2) this popup remains on screen. Ideally it should shutdown automatically.
Advice welcome.
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
119.0.2151.97
SDK Version
2088.41
Framework
Win32
Operating System
Windows 11
OS Version
No response
Repro steps
See my code.
Repros in Edge Browser
No
Regression
No, this never worked
Last working version (if regression)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.