File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
CefSharp.Wpf/Experimental Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace CefSharp . Wpf . Experimental
4
4
{
5
+ /// <summary>
6
+ /// Experimental Extensions
7
+ /// </summary>
5
8
public static class ExperimentalExtensions
6
9
{
10
+ /// <summary>
11
+ /// Html dropdown goes off screen when near bottom of page by default
12
+ /// Calling this method to use the <see cref="MousePositionTransform"/> implementation
13
+ /// to reopsition Popups and mouse.
14
+ ///
15
+ /// Issue https://github.com/cefsharp/CefSharp/issues/2820
16
+ /// </summary>
17
+ /// <param name="chromiumWebBrowser">browser</param>
7
18
public static void UsePopupMouseTransform ( this ChromiumWebBrowser chromiumWebBrowser )
8
19
{
9
20
chromiumWebBrowser . MousePositionTransform = new MousePositionTransform ( ) ;
10
21
}
22
+
23
+ /// <summary>
24
+ /// Use a custom <see cref="IMousePositionTransform"/> implemntation
25
+ /// </summary>
26
+ /// <param name="chromiumWebBrowser">browser</param>
27
+ /// <param name="mousePositionTransform">custom implementation of <see cref="IMousePositionTransform"/>
28
+ /// or defaults to <see cref="NoOpMousePositionTransform"/> if null.
29
+ /// </param>
30
+ public static void UsePopupMouseTransform ( this ChromiumWebBrowser chromiumWebBrowser , IMousePositionTransform mousePositionTransform )
31
+ {
32
+ chromiumWebBrowser . MousePositionTransform = mousePositionTransform ?? new NoOpMousePositionTransform ( ) ;
33
+ }
11
34
}
12
35
}
You can’t perform that action at this time.
0 commit comments