diff --git a/CefSharp.Wpf.HwndHost/ChromiumWebBrowser.cs b/CefSharp.Wpf.HwndHost/ChromiumWebBrowser.cs
index dada23d..edb957e 100644
--- a/CefSharp.Wpf.HwndHost/ChromiumWebBrowser.cs
+++ b/CefSharp.Wpf.HwndHost/ChromiumWebBrowser.cs
@@ -667,10 +667,11 @@ private void PresentationSourceChangedHandler(object sender, SourceChangedEventA
sourceWindow = window;
// If CleanupElement is null, set the CleanupElement to the new window that the browser is moved in.
- if (CleanupElement == null)
- {
- CleanupElement = window;
- }
+ //TODO: Test and uncomment this
+ //if (CleanupElement == null)
+ //{
+ // CleanupElement = window;
+ //}
}
}
else if (args.OldSource != null)
@@ -684,10 +685,11 @@ private void PresentationSourceChangedHandler(object sender, SourceChangedEventA
sourceWindow = null;
// If CleanupElement is the old Window that the browser is moved out of, set CleanupElement to null.
- if (CleanupElement == window)
- {
- CleanupElement = null;
- }
+ //TODO: Test and uncomment this
+ //if (CleanupElement == window)
+ //{
+ // CleanupElement = null;
+ //}
}
}
}
@@ -1351,11 +1353,9 @@ public double ZoomLevelIncrement
DependencyProperty.Register(nameof(ZoomLevelIncrement), typeof(double), typeof(ChromiumWebBrowser), new PropertyMetadata(0.10));
///
- /// The CleanupElement Controls when the BrowserResources will be cleaned up.
- /// The ChromiumWebBrowser will register on Unloaded of the provided Element and dispose all resources when that handler is called.
- /// By default the cleanup element is the Window that contains the ChromiumWebBrowser.
- /// if you want cleanup to happen earlier provide another FrameworkElement.
- /// Be aware that this Control is not usable anymore after cleanup is done.
+ /// The CleanupElement controls when the Browser will be Disposed.
+ /// The will be Disposed when is called.
+ /// Be aware that this Control is not usable anymore after it has been disposed.
///
/// The cleanup element.
public FrameworkElement CleanupElement