fix: navigator.keyboard.lock() fullscreen exit handling (#40365)

fix: navigator.keyboard.lock() fullscreen exit handling
This commit is contained in:
Shelley Vohr 2023-10-31 11:59:39 -04:00 committed by GitHub
parent 4b1c31e4db
commit fcdd5cba71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 86 additions and 16 deletions

View file

@ -42,12 +42,6 @@ bool WebContents::PlatformHandleKeyboardEvent(
event.GetType() == content::NativeWebKeyboardEvent::Type::kChar)
return false;
// Escape exits tabbed fullscreen mode.
if (event.windows_key_code == ui::VKEY_ESCAPE && is_html_fullscreen()) {
ExitFullscreenModeForTab(source);
return true;
}
// Check if the webContents has preferences and to ignore shortcuts
auto* web_preferences = WebContentsPreferences::From(source);
if (web_preferences && web_preferences->ShouldIgnoreMenuShortcuts())