Skip to content

Commit

Permalink
Update BrowserWindow.xaml.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzying2001 committed May 15, 2024
1 parent 6ee05dc commit df00859
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CefFlashBrowser/Views/BrowserWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ public override bool OnPreKeyEvent(IWebBrowser chromiumWebBrowser, IBrowser brow
{
case Win32.VirtualKeys.VK_ESCAPE: //Esc
{
browser.StopLoad();
result = true;
if (browser.IsLoading)
{
browser.StopLoad();
result = true;
}
break;
}
case Win32.VirtualKeys.VK_F5: //F5
Expand All @@ -60,6 +63,7 @@ public override bool OnPreKeyEvent(IWebBrowser chromiumWebBrowser, IBrowser brow
case Win32.VirtualKeys.VK_F11: //F11
{
window.FullScreen = !window.FullScreen;
result = true;
break;
}
case Win32.VirtualKeys.VK_F12: //F12
Expand Down

0 comments on commit df00859

Please sign in to comment.