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
fix: {exit|enter}-html-fullscreen emitted after esc in webview #30537
Conversation
e83acec
to
76e9e15
Compare
@zcbenz it looks like the |
Hmm the other specs could not run on Windows for me, I probably did something wrong. I think you can try enabling them for Windows in another PR. |
Release Notes Persisted
|
I have automatically backported this PR to "13-x-y", please check out #30560 |
I have automatically backported this PR to "14-x-y", please check out #30561 |
I have automatically backported this PR to "15-x-y", please check out #30562 |
/trop run backport-to 12-x-y |
The backport process for this PR has been manually initiated - sending your PR to |
I have automatically backported this PR to "12-x-y", please check out #30669 |
Description of Change
Closes #30509.
Fixes an issue present in
webView
where theleave-html-full-screen
event is not emitted if the user exits fullscreen withesc
instead of by clicking into the webView.This was happening because when the user exits by clicking into the webview, we call into
ExitFullScreenModeFromTab
on the webcontents of the webview - meaning the event is emitted correctly to the webview. When we do so from esc, however, this happens from the wrongwebContents
and so then go and loop through each child webview to ensure they all exit properly withapi_web_contents->SetHtmlApiFullscreen(false);
. Since the emit happens inExitFullScreenModeFromTab
though,leave-html-full-screen
is not emitted again.This fixes the issue by centralizing calls to
Emit("enter-html-full-screen")
andowner_window_->NotifyWindow{Enter|Leave}HtmlFullScreen()
.Checklist
npm test
passesRelease Notes
Notes: Fixes an issue present in
webView
where theleave-html-full-screen
event is not emitted if the user exits fullscreen withesc
instead of by clicking into thewebView
.