fix: return after handling Esc for fullscreen in WebContentsDelegate (#16342)
This commit is contained in:
parent
0299328521
commit
782825fc29
2 changed files with 6 additions and 2 deletions
|
@ -25,8 +25,10 @@ void CommonWebContentsDelegate::HandleKeyboardEvent(
|
|||
return;
|
||||
|
||||
// Escape exits tabbed fullscreen mode.
|
||||
if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen())
|
||||
if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen()) {
|
||||
ExitFullscreenModeForTab(source);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the webContents has preferences and to ignore shortcuts
|
||||
auto* web_preferences = WebContentsPreferences::From(source);
|
||||
|
|
|
@ -21,8 +21,10 @@ void CommonWebContentsDelegate::HandleKeyboardEvent(
|
|||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
// Escape exits tabbed fullscreen mode.
|
||||
if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen())
|
||||
if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen()) {
|
||||
ExitFullscreenModeForTab(source);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the webContents has preferences and to ignore shortcuts
|
||||
auto* web_preferences = WebContentsPreferences::From(source);
|
||||
|
|
Loading…
Reference in a new issue