Skip to content

Commit c6f3ac5

Browse files
committed
fix Focus
1 parent 9a01ca0 commit c6f3ac5

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

src/Avalonia.WebView2/Avalonia.WebView2.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
This package is necessary for Avalonia applications. To learn more about package versions checkout https://aka.ms/wv2-packageversion. To learn best practices checkout: https://aka.ms/wv2-bestpractices.
1111
</Description>
1212
<PackageTags>Web WebView Native native package Edge avalonia avaloniaui dotnet framework core Webview2</PackageTags>
13-
<Version>1.0.1264.42-preview.220711.3</Version>
13+
<Version>1.0.1264.42-preview.220711.4</Version>
1414
</PropertyGroup>
1515

1616
<PropertyGroup Condition=" '$(Configuration)'=='Release' ">

src/Avalonia.WebView2/WebView2.cs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -206,22 +206,18 @@ protected virtual IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lPa
206206
{
207207
switch ((NativeMethods.WM)msg)
208208
{
209-
case NativeMethods.WM.SETFOCUS:
210-
#if !DISABLE_WEBVIEW2_CORE
211-
if (_coreWebView2Controller != null)
212-
{
213-
_coreWebView2Controller.MoveFocus(CoreWebView2MoveFocusReason.Programmatic);
214-
}
215-
#endif
216-
break;
209+
// case NativeMethods.WM.SETFOCUS:
210+
//#if !DISABLE_WEBVIEW2_CORE
211+
// if (_coreWebView2Controller != null)
212+
// {
213+
// _coreWebView2Controller.MoveFocus(CoreWebView2MoveFocusReason.Programmatic);
214+
// }
215+
//#endif
216+
// break;
217217
case NativeMethods.WM.PAINT:
218-
if (!IsInDesignMode)
219-
{
220-
NativeMethods.BeginPaint(hwnd, out var lpPaint);
221-
NativeMethods.EndPaint(hwnd, ref lpPaint);
222-
handled = true;
223-
return IntPtr.Zero;
224-
}
218+
NativeMethods.BeginPaint(hwnd, out var lpPaint);
219+
NativeMethods.EndPaint(hwnd, ref lpPaint);
220+
handled = true;
225221
break;
226222
//case NativeMethods.WM.WINDOWPOSCHANGING:
227223
// break;

0 commit comments

Comments
 (0)