diff --git a/src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs b/src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs index e2bb351f494..217ae0e18e4 100644 --- a/src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs +++ b/src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs @@ -143,18 +143,10 @@ private void WebView_NavigationCompleted(object sender, CoreWebView2NavigationCo if (webView != null) { webView.NavigationCompleted -= WebView_NavigationCompleted; + webView.Focus(); + System.Windows.Forms.SendKeys.SendWait("{TAB}"); } - OnRequestDynamicSplashScreen(); - - this.webView.Focus(); - System.Windows.Forms.SendKeys.SendWait("{TAB}"); - webView.KeyDown += WebView_KeyDown; - } - - private void WebView_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) - { - if (e.Key == Key.Escape) - CloseWindow(); + OnRequestDynamicSplashScreen(); } /// /// Request to close SplashScreen. @@ -482,7 +474,6 @@ protected override void OnClosed(EventArgs e) base.OnClosed(e); DynamoModel.RequestUpdateLoadBarStatus -= DynamoModel_RequestUpdateLoadBarStatus; - webView.KeyDown -= WebView_KeyDown; webView.Dispose(); webView = null;